MSC-14016
PROPULSION SIZING PROGRAM
      PROGRAM LSC(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT)                LSC    0
C     LOW CHAMBER PRESSURE SYSTEM SYNTHESIS PROGRAM                     LSC   10
C     INPUT VARIABLES IN FPS UNITS,TEMP IN RANKINE,PRESS IN PSIA        LSC   20
      DIMENSION TOTI(10),TGASH2(10),TGASO2(10),XMR(10),EPS(10), F(10),XNLSC   30
     1EF(10),XNET(10),N(10),PC(11),WWT(16,60),WK(60,14), WF(60),WI(60),DLSC   40
     2H2(11),DO2(11),WF0(11),PD(5),WF1(5),WTSH(60,6), PTO(10),PTH(10),PTLSC   50
     3(60),TTMAX(10)                                                    LSC   60
      DIMENSION WW(60,13)                                               LSC   70
      DIMENSION PAPSO(10),PAPSH(10)                                     LSC   80
      DIMENSION WWW(60)                                                 LSC   90
      REAL LMAX, LFN                                                    LSC  100
      EQUIVALENCE (N4,N(4)),(N5,N(5)),(N6,N(6)),(N7,N(7)),(N8,N(8)),(N9,LSC  110
     1N(9)),(N1,N(1)),(N10,N(10)),(N(2),N2)                             LSC  120
      COMMON PRESS,DELP,TEMP,X1,X2,X3                                   LSC  130
      COMMON/HEX/TUBDH,TUBDO,TUBSPH,TUBSPO,TUBLGH,TUBLGO,XNTUBH,XNTUBO ,LSC  140
     1XNOPH,XNOPO,PAPSH,PAPSO,IPAPS,IPAP,F,IF,XMR,IMR,XISP ,XNEF,TPAH,TPLSC  150
     2AO,WHEXH,WHEXO,WPRCNO,WPRCNH,TIPRCN,RITO                          LSC  160
      NAMELIST/LOWPC/F,XNET,XNEF,TOTI,TGASH2,TGASO2,XMR,EPS,PTO,PAPSO, PLSC  170
     1TH,PAPSH,WRH2,WRO2,DELPM,PAINJ,NPRTPC,PLOAD ,TTMAX,WPRCNO,WPRCNH,TLSC  180
     2IPRCN ,TUBDH,TUBDO,TUBSPH,TUBSPO,TUBLGH,TUBLGO,XNTUBH,XNTUBO,XNOPHLSC  190
     3 ,XNOPO,RITO,IEND                                                 LSC  200
      COMMON/LINE/LMAX(2),LFN(10,3)                                     LSC  210
      NAMELIST/LINE/LMAX,LFN                                            LSC  220
      COMMON/VALVE/FN(10,2)                                             LSC  230
      NAMELIST/VALVE/FN                                                 LSC  240
  100 DO 110 I=1,10                                                     LSC  250
      F(I)=0.                                                           LSC  260
      TOTI(I)=0.                                                        LSC  270
      TGASH2(I)=0.                                                      LSC  280
      TGASO2(I)=0.                                                      LSC  290
      XMR(I)=0.                                                         LSC  300
      EPS(I)=0.                                                         LSC  310
      PT(I)=0.                                                          LSC  320
      PTH(I)=0.                                                         LSC  330
      PTO(I)=0.                                                         LSC  340
  110 TTMAX(I)=0.                                                       LSC  350
  120 READ(5,LINE)                                                      LSC  360
      WRITE(6,LINE)                                                     LSC  370
      READ(5,VALVE)                                                     LSC  380
      WRITE(6,VALVE)                                                    LSC  390
C    STATEMENT 130 INITIALIZES ARRAY-NUMBER OF INPUT VALUES             LSC  400
C    STATEMENT 140 INITIALIZES ARRAY-COMPONENT WEIGHTS                  LSC  410
C    STATEMENT 150 INITIALIZES ARRAY-HEAT EXCHANGER PARAMETERS          LSC  420
      DO 130 I=1,10                                                     LSC  430
  130 N(I)=10                                                           LSC  440
      DO 140 I=1,15                                                     LSC  450
      DO 140 J=1,60                                                     LSC  460
  140 WWT(I,J)=0.                                                       LSC  470
      DO 150 I=1,60                                                     LSC  480
      DO 150 J=1,13                                                     LSC  490
      WK(I,J)=0.                                                        LSC  500
  150 WW(I,J)=0.                                                        LSC  510
      READ(5,LOWPC)                                                     LSC  520
      WRITE(6,LOWPC)                                                    LSC  530
      DO 160 I=1,10                                                     LSC  540
      IF(ABS(F(I)).LE.1.0E-6) N(1)=N(1)-1                               LSC  550
      IF(ABS(TOTI(I)).LE.1.0E-6) N(4)=N(4)-1                            LSC  560
      IF(ABS(TGASH2(I)).LE.1.0E-6) N(5)=N(5)-1                          LSC  570
      IF(ABS(XMR(I)).LE.1.0E-6) N(6)=N(6)-1                             LSC  580
      IF(ABS(EPS(I)).LE.1.0E-6) N(7)=N(7)-1                             LSC  590
      IF(ABS(PAPSO(I)).LE.1.E-6)N(10)=N(10)-1                           LSC  600
  160 IF(ABS(PTH(I)).LE.1.E-6)N(8)=N(8)-1                               LSC  610
      N(2)=N(1)                                                         LSC  620
      N(3)=N(1)                                                         LSC  630
      N(9)=N(5)                                                         LSC  640
      WRITE(6,170)TIPRCN,RITO,WPRCNH,WPRCNO                             LSC  650
  170 FORMAT(1H1,///////                                                LSC  660
     150X,34HLOW PRESSURE APS SYNTHESIS PROGRAM///////                  LSC  670
     210X,31HPERCENT OF FLOW CONDITIONED IS F7.4/                       LSC  680
     310X,34HRATIO OF INFLOW TO ENGINE FLOW IS F6.3///                  LSC  690
     410X,40HPERCENT OF HYDROGEN FLOW CONDITIONED IS F6.3/              LSC  700
     510X,38HPERCENT OF OXYGEN FLOW CONDITIONED IS F6.3//)              LSC  710
      IF(RITO.GT.1..AND.TIPRCN.EQ.0.)WRITE(6,180)                       LSC  720
  180 FORMAT(///20X,78HPERCENT OF CONDITIONED FLOW IS ZERO,RATIO OF INPULSC  730
     1T TO OUTPUT FLOW IS SET TO 1. )                                   LSC  740
  190 FORMAT(1H1,/,1X,                                                  LSC  750
     1       59HTOTAL LOW PRESSURE SYSYEM WEIGHTS, H2 BOOST TANK PRESSURLSC  760
     2E = ,F7.2,5X,23HO2 BOOST TANK PRESSURE= ,F7.2//,1X,2HMR ,3X,4HAREALSC  770
     3 ,3X, 9H PRESSURE,3X,6HTHRUST,3X,7HN0. ENG,3X,7H(T)TANK,3X,7HCHAMBLSC  780
     4ER,4X,14HLINE DIAMETERS,7X,4HFEED,4X,5HTOTAL,4X,7HIMP DEP,        LSC  790
     5      4X,5HTOTAL /,6X,5HRATIO ,3X,8HAPS TANK ,14X,8HTOT FIRE ,3X,6LSC  800
     6HDESIGN ,  3X,                                                    LSC  810
     7           8HPRESSURE,4X,2HH2,8X,2HO2,7X,6HWEIGHT,4X,7HIMPULSE,4X,LSC  820
     8           6HWEIGHT ,4X,6HWEIGHT /,15X,6HH2  O2 /,13X,10HPSIA  PSILSC  830
     9A ,3X,3HLBF ,16X,5HDEG R ,5X,4HPSIA ,                             LSC  840
     A                   6X,6HINCHES,4X,6HINCHES,5X,3HLBM,5X,6HLB-SEC,6XLSC  850
     B,3HLBM,            6X,3HLBM//)                                    LSC  860
      NCS=0                                                             LSC  870
      KF=0                                                              LSC  880
      KI=0                                                              LSC  890
      IPT=1                                                             LSC  900
      NBTP=0                                                            LSC  910
      NBP=0                                                             LSC  920
      IF(N6*N7*N8*N1*N10*N5*N4.GT.60) GO TO 680                         LSC  930
      DO 500 II=1,N8                                                    LSC  940
      IF(NPRTPC.NE.0) GO TO 200                                         LSC  950
      WRITE(6,190) PTH(II),PTO(II)                                      LSC  960
  200 DO 500 IMR=1,N6                                                   LSC  970
      DO 500 IEPS=1,N7                                                  LSC  980
      JJ=II                                                             LSC  990
      PT(IPT)=AMAX1(PTH(II),PTO(JJ))                                    LSC 1000
      PTT=AMIN1(PTH(II),PTO(JJ))                                        LSC 1010
      I=KF                                                              LSC 1020
      IF(NPRTPC.NE.0) WRITE (6,210)                                     LSC 1030
  210 FORMAT(1H1,1X,16HCHAMBER PRESSURE ,2X,13HENGINE WEIGHT ,6X,12HLINELSC 1040
     1 WEIGHTS ,13X,13HVALVE WEIGHTS ,6X12HTOTAL WEIGHT ,3X,20HBOOST TANLSC 1050
     2K PRESSURES /6X,4HPS1A ,13X,3HLBM ,10X,3HLBM ,9X,3HLBM ,9X,3HLBM ,LSC 1060
     38X,3HLBM ,        9X,3HLBM ,10X,4HPS1A ,8X,4HPSIA //)             LSC 1070
      DO 390 IF=1,N1                                                    LSC 1080
      DO 390 ITMAX=1,N9                                                 LSC 1090
      I=I+1                                                             LSC 1100
      IND=0                                                             LSC 1110
      J=1                                                               LSC 1120
      PC(1)=PTT-DELPM-PAINJ                                             LSC 1130
  220 J=J+1                                                             LSC 1140
      PC(J)=PC(J-1)+(DELPM-.2)/10.                                      LSC 1150
C     ISP CALC                                                          LSC 1160
  230 PRESS=F(IF)                                                       LSC 1170
      DELP=TTMAX(ITMAX)                                                 LSC 1180
      TEMP=TTMAX(ITMAX)                                                 LSC 1190
      X1=EPS(IEPS)                                                      LSC 1200
      X2=XMR(IMR)                                                       LSC 1210
      CALL ENGISP                                                       LSC 1220
      XISP=X1                                                           LSC 1230
C     ENGINE                                                            LSC 1240
      PRESS=PC(J)                                                       LSC 1250
      X1=EPS(IEPS)                                                      LSC 1260
      X2=XNET(IF)                                                       LSC 1270
      X3=F(IF)                                                          LSC 1280
      CALL ENGINE                                                       LSC 1290
      WWT(1,I)=X1                                                       LSC 1300
      WWT(12,I)=X2                                                      LSC 1310
C     LINES                                                             LSC 1320
      PRESS=PT(IPT)                                                     LSC 1330
      TEMP=TTMAX(ITMAX)                                                 LSC 1340
      DELP=PTT-(PC(J)+PAINJ)                                            LSC 1350
      IF(DELP.GT.DELPM) DELP=DELPM                                      LSC 1360
      X1=XMR(IMR)                                                       LSC 1370
      X2=XISP                                                           LSC 1380
      X3=F(IF)                                                          LSC 1390
      CALL XLINE(XL)                                                    LSC 1400
      WWT(2,I)=X1                                                       LSC 1410
      WWT(3,I)=X2                                                       LSC 1420
      DH2(J)=DELP                                                       LSC 1430
      DO2(J)=X3                                                         LSC 1440
C     VALVES                                                            LSC 1450
      X1=DH2(J)                                                         LSC 1460
      X2=DO2(J)                                                         LSC 1470
      PRESS=XNET(IF)                                                    LSC 1480
      DELP=XNEF(IF)                                                     LSC 1490
      CALL VALVE                                                        LSC 1500
      WWT(4,I)=X1                                                       LSC 1510
      WWT(5,I)=X2                                                       LSC 1520
      WF0(J)=0.                                                         LSC 1530
      DO 240 K=1,5                                                      LSC 1540
  240 WF0(J)=WF0(J)+WWT(K,I)                                            LSC 1550
      IF(NPRTPC.EQ.0) GO TO 260                                         LSC 1560
      WRITE(6,250) PC(J),WWT(1,I),WWT(2,I),WWT(3,I),WWT(4,I),WWT(5,I), WLSC 1570
     1F0(J),PTH(II),PTO(II)                                             LSC 1580
  250 FORMAT(1X,F10.2,6X,8F12.2)                                        LSC 1590
  260 IF(IND.EQ.1) GO TO 370                                            LSC 1600
      IF(J.LT.11) GO TO 220                                             LSC 1610
      DO 270 J=3,11                                                     LSC 1620
  270 IF(WF0(J).LT.WF0(J-1)) IND=J                                      LSC 1630
      IF(IND.GT.9) IND=9                                                LSC 1640
      IF(IND.LT.4) IND=4                                                LSC 1650
      DO 280 JL=1,5                                                     LSC 1660
      WF1(JL)=WF0(IND-3+JL)                                             LSC 1670
  280 PD(JL)=PC(IND-3+JL)                                               LSC 1680
      CALL INTERP(5,2,2,PD,WF1)                                         LSC 1690
      IF(NPRTPC.NE.0) WRITE(6,290) XMR(IMR),EPS(IEPS)                   LSC 1700
  290 FORMAT(1X,39HOPTIMUM CHAMBER PRESSURE VALUES FOR MR= ,F5.2,10H  ANLSC 1710
     1D EPS= ,F5.2)                                                     LSC 1720
      IND=1                                                             LSC 1730
      IF(WF1(1).LT.0.) GO TO 350                                        LSC 1740
      IF((-WF1(2)/(2.*WF1(1))).GT.PC(11)) GO TO 300                     LSC 1750
      IF((-WF1(2)/(2.*WF1(1))).LT.PC(2)) GO TO 330                      LSC 1760
      PC(J)=-WF1(2)/(2.*WF1(1))                                         LSC 1770
      GO TO 230                                                         LSC 1780
  300 WRITE(6,310)                                                      LSC 1790
  310 FORMAT(51H0 NO ABSOLUTE MINIMUM FOUND FOR CHAMBER PRESS VS WT)    LSC 1800
      WRITE(6,320)                                                      LSC 1810
  320 FORMAT(1H+,53X,20HIDEAL PC ABOVE RANGE)                           LSC 1820
      J=11                                                              LSC 1830
      GO TO 230                                                         LSC 1840
  330 WRITE(6,310)                                                      LSC 1850
      WRITE(6,340)                                                      LSC 1860
  340 FORMAT(1H+,53X,20HIDEAL PC BELOW RANGE)                           LSC 1870
      J=2                                                               LSC 1880
      GO TO 230                                                         LSC 1890
  350 WRITE(6,310)                                                      LSC 1900
      WRITE(6,360)                                                      LSC 1910
  360 FORMAT(1H+,53X,47HNO MINIMUM FOR PC   LAST VALUES WILL BE PRINTED)LSC 1920
      GO TO 370                                                         LSC 1930
C     MIXER                                                             LSC 1940
  370 IF(RITO.EQ.0) GO TO 380                                           LSC 1950
      PRESS=DH2(J)                                                      LSC 1960
      DELP=DO2(J)                                                       LSC 1970
      TEMP=XNEF(IF)                                                     LSC 1980
      X1=XMR(IMR)                                                       LSC 1990
      X2=XISP                                                           LSC 2000
      X3=F(IF)                                                          LSC 2010
      CALL MIXER                                                        LSC 2020
      WWT(10,I)=X1                                                      LSC 2030
      WWT(11,I)=X2                                                      LSC 2040
C     COLLECT TERMS FOR FEED SYSTEM                                     LSC 2050
  380 WK(I,3)=XMR(IMR)                                                  LSC 2060
      WK(I,4)=EPS(IEPS)                                                 LSC 2070
      WK(I,5)=PTH(II)                                                   LSC 2080
      WK(I,6)=TTMAX(ITMAX)                                              LSC 2090
      WK(I,7)=F(IF)                                                     LSC 2100
      WK(I,8)=XNEF(IF)                                                  LSC 2110
      WK(I,9)=XNET(IF)                                                  LSC 2120
      WK(I,10)=PC(J)                                                    LSC 2130
      WK(I,11)=DH2(J)                                                   LSC 2140
      WK(I,12)=DO2(J)                                                   LSC 2150
      WK(I,13)=PTO(JJ)                                                  LSC 2160
      WF(I)=WF0(J)+WWT(10,I)+WWT(11,I)+WWT(12,I)                        LSC 2170
      IF(NPRTPC.NE.0) WRITE (6,190) PTH(II),PTO(II)                     LSC 2180
  390 CONTINUE                                                          LSC 2190
C     TOTAL IMPULSE DEPENDENT SEGMENT SYNSTHESIS                        LSC 2200
      I=KI                                                              LSC 2210
      DO 450 ITGAS=1,N5                                                 LSC 2220
      DO 450 IPAPS=1,N10                                                LSC 2230
      IPAP=IPAPS                                                        LSC 2240
C     ISP CALC                                                          LSC 2250
      PRESS=F(IF)                                                       LSC 2260
      DELP=TGASO2(ITGAS)                                                LSC 2270
      TEMP=TGASH2(ITGAS)                                                LSC 2280
      X1=EPS(IEPS)                                                      LSC 2290
      X2=XMR(IMR)                                                       LSC 2300
      CALL ENGISP                                                       LSC 2310
      XISP=X1                                                           LSC 2320
C     PASSIVE HEX                                                       LSC 2330
      CALL PASHEX                                                       LSC 2340
      LH=NCS+1                                                          LSC 2350
      WW(LH,1)=PAPSH(IPAPS)                                             LSC 2360
      WW(LH,2)=PAPSO(IPAPS)                                             LSC 2370
      WW(LH,3)=XNTUBH                                                   LSC 2380
      WW(LH,4)=XNTUBO                                                   LSC 2390
      WW(LH,5)=TUBLGH                                                   LSC 2400
      WW(LH,6)=TUBLGO                                                   LSC 2410
      WW(LH,7)=XNOPH                                                    LSC 2420
      WW(LH,8)=XNOPO                                                    LSC 2430
      WW(LH,9)=TPAH                                                     LSC 2440
      WW(LH,10)=TPAO                                                    LSC 2450
      WW(LH,11)=WHEXH                                                   LSC 2460
      WW(LH,12)=WHEXO                                                   LSC 2470
      WWW(LH)=XMR(IMR)                                                  LSC 2480
      BPR=0.                                                            LSC 2490
      NCS=LH                                                            LSC 2500
      WTC=WHEXH+WHEXO                                                   LSC 2510
      DO 450 ITOTI=1,N4                                                 LSC 2520
      WI(I+1)=0.                                                        LSC 2530
      I=I+1                                                             LSC 2540
C     PROPELLANT                                                        LSC 2550
      X1=XISP                                                           LSC 2560
      X2=XMR(IMR)                                                       LSC 2570
      X3=TOTI(ITOTI)                                                    LSC 2580
      CALL PROPEL                                                       LSC 2590
      WWT(6,I)=X1-WRH2 +(RITO-1.)*X1*TIPRCN                             LSC 2600
      WWT(7,I)=X2-WRO2 +(RITO-1.)*X2*TIPRCN                             LSC 2610
C     TANKS                                                             LSC 2620
      PRESS=PAPSH(IPAPS)                                                LSC 2630
      DELP=PAPSO(IPAPS)                                                 LSC 2640
      X1=WWT(6,I)                                                       LSC 2650
      X2=WWT(7,I)                                                       LSC 2660
      CALL TANK                                                         LSC 2670
      WWT(6,I)=X1                                                       LSC 2680
      WWT(7,I)=X2                                                       LSC 2690
      WWT(8,I)=PRESS                                                    LSC 2700
      WWT(9,I)=DELP                                                     LSC 2710
      WWT(16,I)=WWT(6,I)+WWT(7,I)                                       LSC 2720
C     PRESSURIZATION SYSTEM                                             LSC 2730
      CALL HSAT(PLOAD,TH2)                                              LSC 2740
      CALL OSAT(PLOAD,TO2)                                              LSC 2750
      WH2=WWT(6,I)                                                      LSC 2760
      WO2=WWT(7,I)                                                      LSC 2770
      CALL PRESYS(PAPSO(IPAPS),PAPSH(IPAPS),TH2,TO2,WH2,WO2)            LSC 2780
      WWT(14,I)=WH2                                                     LSC 2790
      WWT(15,I)=WO2                                                     LSC 2800
C     COLLECT TERMS FOR TOTAL IMPULSE DEPENDENT TERMS                   LSC 2810
      DO 440 K=6,15                                                     LSC 2820
  440 WI(I)=WI(I)+WWT(K,I)                                              LSC 2830
      WK(I,1)=TOTI(ITOTI)                                               LSC 2840
      WK(I,2)=TGASH2(ITGAS)                                             LSC 2850
      WK(I,14)=TGASO2(ITGAS)                                            LSC 2860
      WW(I,1)=PAPSH(II)                                                 LSC 2870
      WW(I,2)=PAPSO(JJ)                                                 LSC 2880
      WTSH(I,1)=XISP                                                    LSC 2890
      WTSH(I,2)=XMR(IMR)                                                LSC 2900
      WTSH(I,3)=0                                                       LSC 2910
      WTSH(I,4)=XISP                                                    LSC 2920
      WTSH(I,5)=XMR(IMR)                                                LSC 2930
      WTSH(I,6)=EPS(IEPS)                                               LSC 2940
  450 WI(I)=WI(I)+WTC-WWT(10,I)-WWT(11,I)-WWT(12,I)                     LSC 2950
C     SUM/PRINTOUT COMBINATIONS OF WF AND WI FOR SPECIF MR,EPS,AND P(TANLSC 2960
      I=KF                                                              LSC 2970
      WRITE(6,460) XMR(IMR),EPS(IEPS),PAPSH(IPAPS),PAPSO(IPAPS)         LSC 2980
  460 FORMAT(2F4.1,2F6.1)                                               LSC 2990
      DO 480 I2=1,N1                                                    LSC 3000
      J=KI                                                              LSC 3010
      DO 480 I1=1,N9                                                    LSC 3020
      I=I+1                                                             LSC 3030
      IF(NBTP.NE.0)I=1                                                  LSC 3040
      WRITE(6,470) F(I2),XNET(I2),XNEF(I2),TTMAX(I1),(WK(I,M),M=10,12), LSC 3050
     1WF(I)                                                             LSC 3060
  470 FORMAT(1H+,21X,F10.2,2F5.0,5F10.2)                                LSC 3070
      I3=I1                                                             LSC 3080
      DO 480 I4=1,N4                                                    LSC 3090
      J=J+1                                                             LSC 3100
      WS=WF(I)+WI(J)                                                    LSC 3110
      IF(NBTP.NE.0)WS=WF(1)+WI(J)                                       LSC 3120
  480 WRITE(6,490) TOTI(I4),WI(J),WS                                    LSC 3130
  490 FORMAT(1H+,90X,E12.2,2F10.2/)                                     LSC 3140
      KI=J                                                              LSC 3150
      KF=I                                                              LSC 3160
      IPT=IPT+1                                                         LSC 3170
  500 CONTINUE                                                          LSC 3180
C     COMPONENT OUTPUT ROUTINE                                          LSC 3190
      I=KF                                                              LSC 3200
      J=KI                                                              LSC 3210
      READ(5,510)IND                                                    LSC 3220
  510 FORMAT(I3)                                                        LSC 3230
      IF(IND.EQ.1)WRITE(6,520 )                                         LSC 3240
  520 FORMAT(1H1)                                                       LSC 3250
      IF(IND.EQ.1.AND.IEND.EQ.0) GO TO 120                              LSC 3260
      IF(IND.GT.0) GO TO 100                                            LSC 3270
C     ENGINE                                                            LSC 3280
      WRITE(6,530)                                                      LSC 3290
  530 FORMAT(1H1,3X,14HENGINE WEIGHTS//                                 LSC 3300
     1,4X,2HMR ,9X,4HAREA ,8X,6HTHRUST ,6X,6HNUMBER ,6X,7HCHAMBER ,6X   LSC 3310
     2     ,19HBOOST TANK PRESSURE ,6X,6HENGINE ,6X,9HPNEUMATIC /       LSC 3320
     3         ,14X,5HRATIO ,19X,7HENGINES ,5X,8HPRESSURE ,8X2HH2 ,11X,2LSC 3330
     4HO2 ,8X       ,6HWEIGHT ,7X,6HWEIGHT //                           LSC 3340
     5                ,28X,3HLBS ,21X,4HPSIA ,9X,4HPSIA ,9X,4HPSIA ,8X,3LSC 3350
     6HLBS ,10X,3HLBS //)                                               LSC 3360
      WRITE(6,540)((WK(K,3),WK(K,4),WK(K,7),WK(K,9),WK(K,10),WK(I,5) ,WKLSC 3370
     1(I,13),WWT(1,K),WWT(12,K)),K=1,I)                                 LSC 3380
  540 FORMAT(3X,F5.2,4X,F5.0,7X,F10.2,4X,F5.0,3X,F10.2,3X,F10.1,3X ,F10.LSC 3390
     11,3X,F10.2,3X,F10.2)                                              LSC 3400
C     LINES/VALVES                                                      LSC 3410
      WRITE(6,550) XL                                                   LSC 3420
  550 FORMAT(1H1,11HLINE VALVES //,11HLINE LENGTH ,F8.2//,1X,2HMR ,3X,4HLSC 3430
     1AREA ,9X,8HPRESSURE ,6X,8H(T) TANK ,5X,6HTHRUST ,4X,7HNO. ENG ,3X,LSC 3440
     2          7HCHAMBER,4X,14HLINE DIAMETERS,5X,13HLINE  WEIGHTS,     LSC 3450
     3          4X,13HVALVE WEIGHTS /,6X,5HRATIO ,7X,10HBOOST TANK ,6X, LSC 3460
     4               6HDESIGN,13X,9HFIRE  TOT,3X,8HPRESSURE,4X,2HH2,7X,2LSC 3470
     5HO2,           7X,2HH2,5X,2HO2,10X,2HH2,6X,2HO2/,                 LSC 3480
     6               19X,2HH2 ,4X,2HO2 /,                               LSC 3490
     7                 18X,4HPSIA ,2X,4HPSIA ,5X,5HDEG R ,6X,3HLBF ,18X,LSC 3500
     84HPSIA ,9X,6HINCHES ,14X,3HLBM ,14X,3HLBM //)                     LSC 3510
      WRITE(6,560)((WK(K,3),WK(K,4),WK(K,5),WK(K,13),(WK(K,M),M=6,12), (LSC 3520
     1WWT(MM,K),MM=2,5)),K=1,I)                                         LSC 3530
  560 FORMAT(F5.2,2X,F5.2,1X,2F9.2,F10.2,F11.2,2F5.0,F10.2,2F9.3,4F10.2)LSC 3540
C     MIXER ASSEMBLY                                                    LSC 3550
      WRITE(6,570)                                                      LSC 3560
  570 FORMAT(1H1,10HMIXER ASSY //,1X,2HMR ,4X,4HAREA ,8X,8HPRESSURE ,7X,LSC 3570
     18H(T) TANK ,4X,6HTHRUST ,4X,7HNO. ENG ,3X,7HCHAMBER ,4X,13HLINE DILSC 3580
     2AMETER ,6X,18HMIXER ASSY WEIGHTS /,7X,5HRATIO ,6X,10HBOOST TANK ,7LSC 3590
     3X,6HDESIGN ,14X, 8HFIRE TOT ,3X,8HPRESSURE ,4X,2HH2 ,7X,2HO2 ,9X,2LSC 3600
     4HH2 ,9X,2HO2 /,19X,2HH2 ,4X,2HO2 /,18X,4HPSIA ,2X,4HPSIA ,8X,5HDEGLSC 3610
     5 R ,6X,3HLBF ,18X,4HPSIA ,8X, 6HINCHES ,14X,3HLBM /)              LSC 3620
      WRITE(6,580)((WK(K,3),WK(K,4),WK(K,5),WK(K,13),(WK(K,M),M=6,12), (LSC 3630
     1WWT(MM,K),MM=10,11)),K=1,I)                                       LSC 3640
  580 FORMAT(F5.2,2X,F5.2,1X,2F9.2,F10.2,F11.2,2F5.0,F10.2,2F9.3,2F10.2)LSC 3650
C     PROPELLANT                                                        LSC 3660
      WRITE(6,590)                                                      LSC 3670
  590 FORMAT(1H1,18HPROPELLANT WEIGHTS //,                              LSC 3680
     1  4X,2HMR ,6X,4HAREA ,12X 7H(T)TANK ,                             LSC 3690
     2     9X,5HTOTAL ,12X,18HPROPELLANT WEIGHTS ,11X,6HENGISP ,6X,5HSYSLSC 3700
     3MR ,6X, 3HBPR,6X,4HSISP /,27X,9HH2     O2 ,7X,7HIMPULSE ,8X,2HH2 ,LSC 3710
     47X,2HO2 ,7X,   5HTOTAL /25X,12HDEG R  DEG R ,6X,6HLB-SEC ,18X,3HLBLSC 3720
     5M //)                                                             LSC 3730
      WRITE(6,600)((WTSH(K,5),WTSH(K,6),WK(K,2),WK(K,14),WK(K,1), WWT(6,LSC 3740
     1K),WWT(7,K),WWT(16,K),WTSH(K,1),WTSH(K,2), WTSH(K,3),WTSH(K,4)),K=LSC 3750
     21,J)                                                              LSC 3760
  600 FORMAT(3X,F5.2,F8.2,2F12.2,E11.2,5F11.2,F11.5,F11.2)              LSC 3770
C     TANKS                                                             LSC 3780
      WRITE(6,610)                                                      LSC 3790
  610 FORMAT(1H1,27HAPS PROPELLANT TANK WEIGHTS //                      LSC 3800
     1  ,2X,2HMR ,4X,4HAREA ,7X,8HPRESSURE ,11X,8H(T) TANK ,11X,5HTOTAL LSC 3810
     2       ,8X,12HTANK WEIGHTS /,8X,5HRATIO ,5X,10HAPS  TANKS ,9X,2HH2LSC 3820
     3 ,6X,2HO2     ,9X,7HIMPULSE ,7X,2HH2 ,8X,2HO2 /,17X,4HPSIA ,4X,4HPLSC 3830
     4SIA ,7X,5HDEG R     ,2X,5HDEG R ,8X,7HLBS-SEC ,6X,3HLBS ,8X,3HLBS LSC 3840
     5//)                                                               LSC 3850
      WRITE(6,620)((WTSH(K,5),WTSH(K,6),WW(K,1),WW(K,2),WK(K,2), WK(K,14LSC 3860
     1),WK(K,1),WWT(8,K),WWT(9,K)),K=1,J)                               LSC 3870
  620 FORMAT(F5.2,F7.1,2F9.2,F11.2,F8.2,E14.2,F10.2,F12.2)              LSC 3880
C     PRESSURIZATION SYSTEM                                             LSC 3890
      WRITE(6,630)                                                      LSC 3900
  630 FORMAT(1H1,28HPRESSURIZATION SYSTEM WEIGHT //,1X,2HMR ,3X,4HAREA ,LSC 3910
     19X, 8HPRESSURE ,11X,8H(T) TANK ,11X,5HTOTAL ,6X,18HPROPELLANT WEIGLSC 3920
     2HTS ,4X, 21HPRESSURIZATION WEIGHT ,                               LSC 3930
     3           /,6X,5HRATIO ,8X,9HAPS TANKS ,11X,11HH2       O2 ,7X,7HLSC 3940
     4IMPULSE ,8X,    2HH2 ,8X,2HO2 ,10X,2HH2 ,6X,2HO2 ,//21X,4HPSIA ,2XLSC 3950
     5,4HPSIA ,7X,12HDEG R  DEG R ,6X,6HLB-SEC ,12X,3HLBM ,17X,3HLBM //)LSC 3960
      WRITE(6,640)((WTSH(K,5),WTSH(K,6),WW(K,1),WW(K,2), WK(K,2),WK(K,14LSC 3970
     1),WK(K,1), WWT(6,K),WWT(7,K), WWT(14,K),WWT(15,K)),K=1,J)         LSC 3980
  640 FORMAT(F5.2,F7.2,F9.2,3F11.2,E11.2,4F11.2)                        LSC 3990
      IF(TIPRCN.EQ.0.) GO TO 670                                        LSC 4000
C     PASSIVE CONDITIONING SYSTEM                                       LSC 4010
      WRITE(6,660)(WWW(IL),WK(IL,1),(WW(IL,J),J=1,12),IL=1,NCS)         LSC 4020
  660 FORMAT(1H1,/52X,27HPASSIVE CONDITIONING SYSTEM//                  LSC 4030
     143X,44HSURFACE HEAT EXCHANGERS ON MAIN ENGINE TANKS //            LSC 4040
     2  4X,2HMR ,5X,7HIMPULSE ,4X,10HTANK  PRES ,5X,10HHEX  TUBES ,5X   LSC 4050
     3        ,10HHEX LENGTH ,5X,10HHEX PANELS ,5X,10HPANEL AREA ,5X,10HLSC 4060
     4HEX WEIGHT /    ,11X,6HTOTAL  ,5X,2HH2 ,6X,2HO2 ,5X,2HH2 ,6X,2HO2 LSC 4070
     5,5X,2HH2 ,6X,2HO2      ,5X,2HH2 ,6X,2HO2 ,5X,2HH2 ,6X,2HO2 ,5X,2HHLSC 4080
     62 ,6X,2HO2 //                ,11X,6HLB-SEC ,8X,4HPSIA ,10X,6HNUMBELSC 4090
     7R ,10X,4HFEET ,10X,6HNUMBER       ,9X,5HSQ FT ,11X,3HLBS //       LSC 4100
     8                                    ,(F6.1,E12.2,F8.1,F6.1,F8.0,F7LSC 4110
     9.0,2F8.1,F5.0,F9.0,2F8.0,2F7.0))                                  LSC 4120
  670 WRITE(6,520 )                                                     LSC 4130
      IF(IEND.EQ.0) GO TO 120                                           LSC 4140
      GO TO 100                                                         LSC 4150
  680 WRITE(6,690)                                                      LSC 4160
  690 FORMAT(///40X,49HTOTAL NUMBER OF CASES GT 60,NEXT SET OF CASES RUNLSC 4170
     1)                                                                 LSC 4180
      READ(5,510)IND                                                    LSC 4190
      GO TO 670                                                         LSC 4200
      END                                                               LSC 4210
      SUBROUTINE ENGISP                                                 ENGI   0
C.........VERSION 28 AUG 1970 ............                              ENGI  10
      COMMON F,TO,TH,EPS,XMR,AA                                         ENGI  20
      DATA A0,A1,A2,A3,A4/3.0615486E2,8.236289E1,-2.5341553E1,2.0052997,ENGI  30
     10./                                                               ENGI  40
      DATA B0,B1,B2,B3,B4,B5/9.5669612E-1,5.6185918E-5,-2.4131457E-8 ,4.ENGI  50
     18906032E-12,-4.5638046E-16,1.5831677E-20/                         ENGI  60
      DATA C0,C1,C2,C3,C4,C5/7.2869684E-1,1.2401970E-1,-2.1588381E-2 ,1.ENGI  70
     19211745E-3,-8.3143012E-5,1.3822115E-6/                            ENGI  80
      DATA D0,D1,D2/-1.888383E1,4.4876594E-2,-1.8175606E-5/             ENGI  90
      DATA E0,E1,E2/-2.8246153,5.6461536E-3,-7.6923060E-7/              ENGI 100
      DATA H0,H1,H2/1.02231,-1.8563732E-2,4.2676188E-3/                 ENGI 110
      CMR=A0+XMR*(A1+XMR*(A2+XMR*(A3+XMR*A4)))                          ENGI 120
      CF=B0+F*(B1+F*(B2+F*(B3+F*(B4+F*B5))))                            ENGI 130
      CEPS=C0+EPS*(C1+EPS*(C2+EPS*(C3+EPS*(C4+EPS*C5))))                ENGI 140
      CTH=D0+TH*(D1+TH*D2)                                              ENGI 150
      CTO=E0+TO*(E1+TO*E2)                                              ENGI 160
      G=H0+H1*XMR+H2*XMR**2.                                            ENGI 170
      CSTAR=1.+(G-1.)*(F-1500.)/3500.                                   ENGI 180
      XISP=(CMR*CF*CEPS*CSTAR)+CTH+CTO                                  ENGI 190
      EPS=XISP                                                          ENGI 200
      RETURN                                                            ENGI 210
      END                                                               ENGI 220
      SUBROUTINE ENGINE                                                 ENGI   0
C     SUBROUTINE FOR LOW CHAMBER PRESSURE ENGINES                       ENGI  10
C.......VERSION 21 DEC 1970.......                                      ENGI  20
      COMMON PC,AA,AB,EPS,XNET,F                                        ENGI  30
      DATA A0,A1,A2,A3,A4/26.698,0.90973,-1.7485E-3,4.5798E-6, -2.49955EENGI  40
     1-9/                                                               ENGI  50
      DATA B0,B1,B2,B3/.703277,1.82569E-2,7.274E-5,3.03479E-6/          ENGI  60
C   ENGINE WEIGHTS                                                      ENGI  70
      RFTP=F/PC                                                         ENGI  80
      WTA=A0+RFTP*(A1+RFTP*(A2+RFTP*(A3+RFTP*A4)))                      ENGI  90
      WTB=B0+EPS*(B1+EPS*(B2+EPS*B3))                                   ENGI 100
      WT=WTA*WTB                                                        ENGI 110
      EPS=WT*XNET                                                       ENGI 120
C   PNEUMATIC SUBASSY WEIGHTS                                           ENGI 130
      WTPSA=5.5*XNET                                                    ENGI 140
      XNET=WTPSA                                                        ENGI 150
      RETURN                                                            ENGI 160
      END                                                               ENGI 170
      SUBROUTINE XLINE(XL)                                              XLIN   0
C........VERSION 24 JULY 70........                                     XLIN  10
C.....F THRUST OF ONE ENGINE                                            XLIN  20
      COMMON PRESS,DELP,TEMP,XMR,XISP,THRUST                            XLIN  30
      COMMON/LINE/LMAX(2),LFN(10,3)                                     XLIN  40
      DATA S,RHO/64000.,.101/,PI/3.14159/                               XLIN  50
      REAL MR,ISP,LMAX,LFN                                              XLIN  60
      FH2(P,TH2,TWH2,DPDL)=((.00753*TWH2**2.*TH2/(DPDL*2.*P))*(.0065- .0XLIN  70
     100515*ALOG(TWH2*520./2.)))**.2*12.                                XLIN  80
      FO2(P,TO2,TWO2,DPDL)=((.00753*TWO2**2.*TO2/(DPDL*32.*P))*(.0065- .XLIN  90
     1000515*ALOG(TWO2*520./32.)))**.2*12.                              XLIN 100
      TH2=TEMP                                                          XLIN 110
      TO2=TEMP                                                          XLIN 120
      F=THRUST                                                          XLIN 130
      MR=XMR                                                            XLIN 140
      ISP=XISP                                                          XLIN 150
C     LMAX=MAXIMUM LINE LENGTH    LFN=PIPE LENGTH,MAX.NO.ENGS.FIRING,NO XLIN 160
C     OF LINES OF THIS LENGTH MATRIX                                    XLIN 170
C   FIND DP/DC                                                          XLIN 180
C   ASSUME TWO SYMMETRICAL LINES,FIRST 5 LINES FOR,SECOND 5 AFT         XLIN 190
      WDOTH2=(F/ISP)/(MR+1.)                                            XLIN 200
      WDOTO2=MR*WDOTH2                                                  XLIN 210
      WH2=0                                                             XLIN 220
      WO2=0                                                             XLIN 230
      DO 110 I=1,2                                                      XLIN 240
      P=PRESS                                                           XLIN 250
      DPDL=DELP/LMAX(I)                                                 XLIN 260
      DO 110 J=1,5                                                      XLIN 270
      N=I*5-5+J                                                         XLIN 280
C   SIZE LINE SEGMENTS                                                  XLIN 290
      P=P-DPDL*LFN(N,1)/2.                                              XLIN 300
C   ASSUME ISOTHERMAL LINES                                             XLIN 310
      TWH2=WDOTH2*LFN(N,2)                                              XLIN 320
      TWO2=WDOTO2*LFN(N,2)                                              XLIN 330
      DH2=FH2(P,TH2,TWH2,DPDL)                                          XLIN 340
      DO2=FO2(P,TO2,TWO2,DPDL)                                          XLIN 350
      IF (N.GT.1) GO TO 100                                             XLIN 360
      DMAXH2=DH2                                                        XLIN 370
      DMAXO2=DO2                                                        XLIN 380
  100 THH2S=P*DH2*2./(2.*S)                                             XLIN 390
      IF (DH2.GT.8.0) THH2=DH2/180.                                     XLIN 400
      IF (DH2.LE.8.0) THH2=0.049                                        XLIN 410
      IF (DH2.LE.6.0) THH2=0.035                                        XLIN 420
      IF (DH2.LE.4.0) THH2=0.022                                        XLIN 430
      IF (DH2.LE.2.0) THH2=0.020                                        XLIN 440
      THH2=AMAX1(THH2S,THH2)                                            XLIN 450
      THO2S=P*DO2*2./(2.*S)                                             XLIN 460
      IF (DO2.GT.8.0) THO2=DO2/180.                                     XLIN 470
      IF (DO2.LE.8.0) THO2=0.049                                        XLIN 480
      IF (DO2.LE.6.0) THO2=0.035                                        XLIN 490
      IF (DO2.LE.4.0) THO2=0.022                                        XLIN 500
      IF (DO2.LE.2.0) THO2=0.020                                        XLIN 510
      THO2=AMAX1(THO2S,THO2)                                            XLIN 520
C   WEIGHTS                                                             XLIN 530
      WH2=WH2+RHO*PI*DH2*THH2*LFN(N,1)*12.*LFN(N,3)                     XLIN 540
      WO2=WO2+RHO*PI*DO2*THO2*LFN(N,1)*12.*LFN(N,3)                     XLIN 550
  110 P=P-DPDL*LFN(N,1)/2.                                              XLIN 560
      DELP=DMAXH2                                                       XLIN 570
      THRUST=DMAXO2                                                     XLIN 580
C   COMPENSATORS (ANGULAR AND LINEAR) WEIGHT FACTOR IS 2.0 (ALUMINUM)   XLIN 590
      XMR=2.0*WH2                                                       XLIN 600
      XISP=2.0*WO2                                                      XLIN 610
      RETURN                                                            XLIN 620
      END                                                               XLIN 630
      SUBROUTINE VALVE                                                  VALV   0
C......VERSION 26 APRIL 71......                                        VALV  10
      COMMON XNET,XNEF,AC,DH2,DO2,AD                                    VALV  20
      COMMON/VALVE/FN(10,2)                                             VALV  30
      WH2=0.                                                            VALV  40
      WO2=0.                                                            VALV  50
C   VALVE WEIGHTS                                                       VALV  60
      DO 100 I=1,10                                                     VALV  70
      DVALH2=DH2*SQRT(FN(I,1)/XNEF)                                     VALV  80
      WTVALH=FN(I,2)*1.59037*DVALH2**1.21447                            VALV  90
      WH2=WH2+WTVALH                                                    VALV 100
      DVALO2=DO2*SQRT(FN(I,1)/XNEF)                                     VALV 110
      WTVALO=FN(I,2)*1.59037*DVALO2**1.21447                            VALV 120
  100 WO2=WO2+WTVALO                                                    VALV 130
      DH2=WH2                                                           VALV 140
      DO2=WO2                                                           VALV 150
      RETURN                                                            VALV 160
      END                                                               VALV 170
      SUBROUTINE INTERP(N,NQ,N1,X,Y)                                    INTE   0
C.........VERSION 13 DEC 69............                                 INTE  10
      DIMENSION A(10,11),B(10,11),C(10),D(11),E(10),X(N),Y(N)           INTE  20
      XN=0.                                                             INTE  30
      ID=N+1                                                            INTE  40
      DO 100 I=1,N                                                      INTE  50
      XN=XN+1.                                                          INTE  60
      DO 100 J=1,ID                                                     INTE  70
      A(I,J)=0.0                                                        INTE  80
  100 B(I,J)=1.0                                                        INTE  90
      IF(NQ.EQ.2) GO TO 190                                             INTE 100
C     LAGRANGE METHOD                                                   INTE 110
C     FIND NUMERATOR                                                    INTE 120
      A(1,N)=-X(2)                                                      INTE 130
      A(1,N-1)=1.                                                       INTE 140
      DO 140 I=1,N                                                      INTE 150
      IF(I.EQ.1) GO TO 110                                              INTE 160
      A(I,N)=-X(1)                                                      INTE 170
      A(I,N-1)=1.                                                       INTE 180
  110 DO 140 J=2,N                                                      INTE 190
      IF(I.EQ.J) GO TO 130                                              INTE 200
      IF((I*J).EQ.2) GO TO 130                                          INTE 210
      DO 120 J1=1,N                                                     INTE 220
  120 A(I,J1)=A(I,J1+1)-A(I,J1)*X(J)                                    INTE 230
  130 CONTINUE                                                          INTE 240
  140 CONTINUE                                                          INTE 250
C     FIND DENOMINATOR                                                  INTE 260
      DO 160 I=1,N                                                      INTE 270
      E(I)=1                                                            INTE 280
      DO 160 J=1,N                                                      INTE 290
      IF(I.EQ.J) GO TO 150                                              INTE 300
      E(I)=E(I)*(X(I)-X(J))                                             INTE 310
  150 CONTINUE                                                          INTE 320
  160 CONTINUE                                                          INTE 330
      DO 170 I=1,N                                                      INTE 340
      DO 170 J=1,N                                                      INTE 350
  170 A(I,J)=A(I,J)*Y(I)/E(I)                                           INTE 360
C     SUM LIKE POWER COEFFICIENTS                                       INTE 370
      DO 180 I=1,N                                                      INTE 380
      C(I)=0.0                                                          INTE 390
      DO 180 J=1,N                                                      INTE 400
  180 C(I)=C(I)+A(J,I)                                                  INTE 410
      IF(NQ.EQ.1) GO TO 370                                             INTE 420
C     LEAST SQUARES METHOD                                              INTE 430
C     FIND NEEDED SUMS OF RESIDUALS                                     INTE 440
      ID=N1+N1                                                          INTE 450
  190 DO 200 I=1,ID                                                     INTE 460
      D(I)=X(1)**I                                                      INTE 470
      DO 200 J=2,N                                                      INTE 480
  200 D(I)=D(I)+X(J)**I                                                 INTE 490
      N2=N1+1                                                           INTE 500
      DO 210 I=1,N2                                                     INTE 510
      E(I)=0.                                                           INTE 520
      DO 210 J=1,N                                                      INTE 530
  210 E(I)=E(I)+Y(J)*X(J)**(I-1)                                        INTE 540
C     SET UP AUGMENTED MATRIX                                           INTE 550
      DO 250 I=1,N2                                                     INTE 560
      DO 250 J=1,N2                                                     INTE 570
      IF(I*J-1)230,220,230                                              INTE 580
  220 A(1,1)=XN                                                         INTE 590
      GO TO 240                                                         INTE 600
  230 A(I,J)=D(J+I-2)                                                   INTE 610
  240 CONTINUE                                                          INTE 620
  250 CONTINUE                                                          INTE 630
      DO 260 I=1,N2                                                     INTE 640
  260 A(I,N1+2)=E(I)                                                    INTE 650
C     REDUCE MATRIX                                                     INTE 660
      DO 320 M=1,N1                                                     INTE 670
C     FIND PIVOT                                                        INTE 680
      MZ=M                                                              INTE 690
      M1=M+1                                                            INTE 700
      DO 280 J=M1,N1                                                    INTE 710
      IF(ABS(A(J,M)).LT.ABS(A(MZ,M))) GO TO 270                         INTE 720
      MZ=J                                                              INTE 730
  270 CONTINUE                                                          INTE 740
  280 CONTINUE                                                          INTE 750
C     EXCHANGE ROWS                                                     INTE 760
      IF(MZ.EQ.M) GO TO 300                                             INTE 770
      N3=N1+2                                                           INTE 780
      DO 290 J=M,N3                                                     INTE 790
      B(M,J)=A(MZ,J)                                                    INTE 800
      A(MZ,J)=A(M,J)                                                    INTE 810
  290 A(M,J)=B(M,J)                                                     INTE 820
C     SUBTRACT ROWS                                                     INTE 830
  300 DO 310 J=M1,N2                                                    INTE 840
      XK=A(J,M)/A(M,M)                                                  INTE 850
      DO 310 J1=M,N3                                                    INTE 860
  310 A(J,J1)=A(J,J1)-A(M,J1)*XK                                        INTE 870
  320 CONTINUE                                                          INTE 880
C     BACK SUBSTITUTE                                                   INTE 890
      DO 360 M=1,N2                                                     INTE 900
      I=N1+2-M                                                          INTE 910
      IF(M.GT.1) GO TO 330                                              INTE 920
      XK=A(I,N1+2)/A(I,I)                                               INTE 930
      D(I)=XK                                                           INTE 940
      GO TO 350                                                         INTE 950
  330 D(I)=A(I,N1+2)                                                    INTE 960
      M0=M-1                                                            INTE 970
      DO 340 J=1,M0                                                     INTE 980
  340 D(I)=D(I)-D(I+J)*A(I,I+J)                                         INTE 990
      D(I)=D(I)/A(I,I)                                                  INTE1000
  350 CONTINUE                                                          INTE1010
  360 CONTINUE                                                          INTE1020
C     RETURN ROUTINE                                                    INTE1030
  370 CONTINUE                                                          INTE1040
C     PUT LAGRANGE COEFFICIENTS IN X ARRAY,DESCENDING ORDER             INTE1050
      IF(NQ.EQ.2) GO TO 390                                             INTE1060
      DO 380 I=1,N                                                      INTE1070
  380 X(I)=C(I)                                                         INTE1080
C     PUT LST SQR COEFFICIENTS IN Y ARRAY,DESCENDING ORDER              INTE1090
  390 IF(NQ.EQ.1) GO TO 410                                             INTE1100
      DO 400 I=1,N2                                                     INTE1110
  400 Y(I)=D(N1+2-I)                                                    INTE1120
  410 RETURN                                                            INTE1130
      END                                                               INTE1140
      SUBROUTINE MIXER                                                  MIXE   0
C......VERSION 26 APR 71......                                          MIXE  10
      COMMON DH2,DO2,XNEF,XMR,XISP,THRUST                               MIXE  20
      REAL MR,ISP,NEF,LFRH2,LFRO2,LVELH2,LVELO2                         MIXE  30
      DATA LFRH2,LFRO2/0.78,0.48/,LVELH2,LVELO2/50.,30./ ,RHOH2,RHOO2/4.MIXE  40
     113,71.6/,PI/3.14159/                                              MIXE  50
      F=THRUST                                                          MIXE  60
      MR=XMR                                                            MIXE  70
      ISP=XISP                                                          MIXE  80
      NEF=XNEF                                                          MIXE  90
C   GAS OR ENGINE FLOW RATE (MAXIMUM)                                   MIXE 100
      WDOTH2=((F*NEF)/ISP)/(MR+1.)                                      MIXE 110
      WDOTO2=MR*WDOTH2                                                  MIXE 120
C   LIQUID FLOW RATE (MAXIMUM,TGAS=600 R)                               MIXE 130
      WDOTLH=LFRH2*WDOTH2                                               MIXE 140
      WDOTLO=LFRO2*WDOTO2                                               MIXE 150
C   MIXER CHAMBER (MC) WEIGHT                                           MIXE 160
      WMCH2=0.0339*5.*DH2**2.                                           MIXE 170
      WMCO2=0.0635*5.*DO2**2.                                           MIXE 180
C   PRESSURE REGULATOR (PR) WEIGHT,IRIS TYPE,2 REQD.                    MIXE 190
      WPRH2=2.*6.39142*WDOTH2**0.401987                                 MIXE 200
      WPRO2=2.*3.66081*WDOTO2**0.401987                                 MIXE 210
C   THROTTLE VALVE (TV) WEIGHT,CAVITATING VENTURI VALVE AND ACTUATOR    MIXE 220
      WLT=WDOTLH+WDOTLO                                                 MIXE 230
      WTV=2.*(.0944*(WLT*ISP/100.)**1.115+1.5*2.45*(WLT*ISP/100.)**.421)MIXE 240
C   LIQUID VALVE (LV) WEIGHT,3 REQD.                                    MIXE 250
      ALH2=WDOTLH*144/(RHOH2*LVELH2)                                    MIXE 260
      DIALH2=(ALH2*4./PI)**0.5                                          MIXE 270
      WLVH2=3.*(2.43*DIALH2**1.378)                                     MIXE 280
      ALO2=WDOTLO*144./(RHOO2*LVELO2)                                   MIXE 290
      DIALO2=(ALO2*4./PI)**0.5                                          MIXE 300
      WLVO2=3.*(2.43*DIALO2**1.378)                                     MIXE 310
C   GAS VALVE (GV) WEIGHT,VISOR TYPE,2 REQD.                            MIXE 320
      WGVH2=2.*(1.59037*DH2**1.21447)                                   MIXE 330
      WGVO2=2.*(1.59037*DO2**1.21447)                                   MIXE 340
C   TOTAL MIXER ASSEMBLY (MA) WEIGHT                                    MIXE 350
      WMAH2=WMCH2+WPRH2+WTV/2.+WLVH2+WGVH2                              MIXE 360
      WMAO2=WMCO2+WPRO2+WTV/2.+WLVO2+WGVO2                              MIXE 370
      XMR=WMAH2                                                         MIXE 380
      XISP=WMAO2                                                        MIXE 390
      RETURN                                                            MIXE 400
      END                                                               MIXE 410
      SUBROUTINE PASHEX                                                 PASH   0
C......VERSION 1 MAY 71......                                           PASH  10
C    F THRUST OF ONE ENGINE                                             PASH  20
      DIMENSION F(10),XMR(10),PTH(10),PTO(10),XNEF(10)                  PASH  30
      COMMON/HEX/TUBDH,TUBDO,TUBSPH,TUBSPO,TUBLGH,TUBLGO,XNTUBH,XNTUBO ,PASH  40
     1XNOPH,XNOPO,PTH,PTO,II,JJ,F,IF,XMR,IMR,XISP ,XNEF,TPAH,TPAO,WHEXH,PASH  50
     2WHEXO,WPRCNO,WPRCNH,TIPRCN,RITO                                   PASH  60
      REAL LVELH2,LVELO2                                                PASH  70
      DATA RHOTU,ULTS/.101,64000./,LVELH2,LVELO2/50.,30./,PI/3.14159/ ,RPASH  80
     1HOH2,RHOO2/4.13,71.6/,XLGH,XLGO/33.,20./                          PASH  90
      TPAH=0.                                                           PASH 100
      TPAO=0.                                                           PASH 110
      WHEXH=0.                                                          PASH 120
      WHEXO=0.                                                          PASH 130
      IF(TIPRCN.EQ.0.0) RETURN                                          PASH 140
C    MASS FLOW RATES,TIPRCN IS ONE                                      PASH 150
      WDOTH2=(F(IF)/XISP)/(XMR(IMR)+1.)*XNEF(IF)*RITO                   PASH 160
      WDOTO2=WDOTH2*XMR(IMR)                                            PASH 170
      WDOTH2=WDOTH2*WPRCNH                                              PASH 180
      WDOTO2=WDOTO2*WPRCNO                                              PASH 190
C    HYDROGEN SIDE                                                      PASH 200
      IF(WPRCNH.EQ.0.0) GO TO 100                                       PASH 210
C    TUBE WEIGHTS                                                       PASH 220
      TTHH2=PTH(II)*TUBDH/ULTS                                          PASH 230
      IF(TTHH2.LT.0.022) TTHH2=0.022                                    PASH 240
      TUBODH=TUBDH+2.*TTHH2                                             PASH 250
      TUBAH=PI/4.*(TUBODH**2-TUBDH**2.)+(TTHH2*1.1)*3.*TUBDH            PASH 260
      TUBWH=TUBAH*TUBLGH*XNTUBH*XNOPH*RHOTU*12.                         PASH 270
C    TUBE ATTACHMENT (RIVET WT=0.015LBS/FT)                             PASH 280
      RIVWH=.015*TUBLGH*XNTUBH*XNOPH                                    PASH 290
C    LIQUID LINES                                                       PASH 300
      ALLH=WDOTH2*144./(RHOH2*LVELH2)                                   PASH 310
      DLLH=(ALLH*4./PI)**.5                                             PASH 320
      TLLH=PTH(II)*DLLH/ULTS                                            PASH 330
      IF(TLLH.LT.0.022) TLLH=.022                                       PASH 340
      XLLLH=XLGH+XNOPH*TUBLGH                                           PASH 350
      WLLH=PI*DLLH*TLLH*XLLLH*RHOTU*12.                                 PASH 360
C    LIQUID MANIFOLDS                                                   PASH 370
      DLMH=DLLH*(1./XNOPH)**.5                                          PASH 380
      TLMH=PTH(II)*DLMH/ULTS                                            PASH 390
      IF(TLMH.LT.0.022) TLMH=.022                                       PASH 400
      XLLMH=XNTUBH*TUBSPH                                               PASH 410
      WLMH=PI*DLMH*TLMH*XLLMH*RHOTU*XNOPH                               PASH 420
C    GAS MANIFOLD                                                       PASH 430
      GMAH=(XNTUBH/4.)*(PI/4.)*TUBDH**2.                                PASH 440
      GMDH=(GMAH*4./PI)**.5                                             PASH 450
      GMTH=PTH(II)*GMDH/ULTS                                            PASH 460
      IF(GMTH.LT.0.030) GMTH=0.030                                      PASH 470
      GMLGH=XNTUBH*TUBSPH                                               PASH 480
      WGMH=PI*GMDH*GMTH*GMLGH*RHOTU*XNOPH                               PASH 490
C    VALVE WEIGHTS (5 REQD)                                             PASH 500
      WVH=5.*2.43*(DLLH)**1.378                                         PASH 510
C    PANEL AREA (TOTAL)                                                 PASH 520
      TPAH=XNTUBH*TUBSPH*TUBLGH*XNOPH/12.                               PASH 530
C    TOTAL WEIGHTS                                                      PASH 540
      WHEXH=TUBWH+RIVWH+WLLH+WLMH+WGMH+WVH                              PASH 550
C    OXYGEN SIDE                                                        PASH 560
  100 IF(WPRCNO.EQ.0.0) RETURN                                          PASH 570
C    TUBE WEIGHTS                                                       PASH 580
      TTHO2=PTO(JJ)*TUBDO/ULTS                                          PASH 590
      IF(TTHO2.LT.0.022) TTHO2=0.022                                    PASH 600
      TUBODO=TUBDO+2.*TTHO2                                             PASH 610
      TUBAO=PI/4.*(TUBODO**2.-TUBDO**2.)+(TTHO2*1.1)*2.2*TUBDO          PASH 620
      TUBWO=TUBAO*TUBLGO*XNTUBO*XNOPO*RHOTU*12.                         PASH 630
C    TUBE ATTACHMENT (RIVET WT=0.015LBS/FT)                             PASH 640
      RIVWO=.015*TUBLGO*XNTUBO*XNOPO                                    PASH 650
C    LIQUID LINES                                                       PASH 660
      ALLO=WDOTO2*144./(RHOO2*LVELO2)                                   PASH 670
      DLLO=(ALLO*4./PI)**.5                                             PASH 680
      TLLO=PTO(JJ)*DLLO/ULTS                                            PASH 690
      IF(TLLO.LT.0.022) TLLO=.022                                       PASH 700
      XLLLO=XLGO+XNOPO*TUBLGO                                           PASH 710
      WLLO=PI*DLLO*TLLO*XLLLO*RHOTU*12.                                 PASH 720
C    LIQUID MANIFOLDS                                                   PASH 730
      DLMO=DLLO*(1./XNOPO)**.5                                          PASH 740
      TLMO=PTO(JJ)*DLMO/ULTS                                            PASH 750
      IF(TLMO.LT.0.022) TLMO=.022                                       PASH 760
      XLLMO=XNTUBO*TUBSPO                                               PASH 770
      WLMO=PI*DLMO*TLMO*XLLMO*RHOTU*XNOPO                               PASH 780
C    GAS MANIFOLD                                                       PASH 790
      GMAO=(XNTUBO/4.)*(PI/4.)*TUBDO**2.                                PASH 800
      GMDO=(GMAO*4./PI)**.5                                             PASH 810
      GMTO=PTO(JJ)*GMDO/ULTS                                            PASH 820
      IF(GMTO.LT.0.030) GMTO=0.030                                      PASH 830
      GMLGO=XNTUBO*TUBSPO                                               PASH 840
      WGMO=PI*GMDO*GMTO*GMLGO*RHOTU*XNOPO                               PASH 850
C    VALVE WEIGHTS (5 REQD)                                             PASH 860
      WVO=5.*2.43*(DLLO)**1.378                                         PASH 870
C    PANEL AREA (TOTAL)                                                 PASH 880
      TPAO=XNTUBO*TUBSPO*TUBLGO*XNOPO/12.                               PASH 890
C    TOTAL WEIGHTS                                                      PASH 900
      WHEXO=TUBWO+RIVWO+WLLO+WLMO+WGMO+WVO                              PASH 910
      RETURN                                                            PASH 920
      END                                                               PASH 930
      SUBROUTINE PROPEL                                                 PROP   0
C.........VERSION 13 DEC 69............                                 PROP  10
      COMMON AA,AB,AC,XISP,XMR,TOTI                                     PROP  20
      WH2=TOTI/XISP*(1./(XMR+1.))                                       PROP  30
      WO2=TOTI/XISP*(XMR/(XMR+1.))                                      PROP  40
      XISP=WH2                                                          PROP  50
      XMR=WO2                                                           PROP  60
      RETURN                                                            PROP  70
      END                                                               PROP  80
      SUBROUTINE TANK                                                   TANK   0
C.......VERSION 5 MAR 71...........                                     TANK  10
C.....INCLUDES TANK AND SUPPORTS,FOAM(H2),COOLING SHROUD,INSULATION AND TANK  20
C     SUPPORTS,FIBERGLASS AND SUPPORTS,AND PROPELLANT ACQUISITION DEVICETANK  30
      COMMON PTH,PTO,AB,WH2,WO2,AC                                      TANK  40
      REAL N1,N2                                                        TANK  50
C   TANK BURST PRESSURE                                                 TANK  60
      PBH2=PTH*2.0                                                      TANK  70
      PBO2=PTO*2.0                                                      TANK  80
C   PROPELLANT VENT,BOIL OFF,AND LIQUID RESIDUALS (8 DAY MISSION)       TANK  90
      IF(WH2.LT.1.0) GO TO 100                                          TANK  95
      WVH2=(((WH2/1930.)**.667)*72.+9.7)/181.*8.*24.                    TANK 100
      WBOH2=25.*((WH2/1930.)**.667)                                     TANK 110
      WH2=WH2+WVH2+WBOH2                                                TANK 120
      WH2=WH2/.991                                                      TANK 130
  100 IF(WO2.LT.1.0) GO TO 110                                          TANK 135
      WVO2=0.0                                                          TANK 140
      WBOO2=48.*((WO2/5800.)**.667)                                     TANK 150
      WO2=WO2+WVO2+WBOO2                                                TANK 160
      WO2=WO2/.987                                                      TANK 170
C   TANK SIZE                                                           TANK 180
  110 VOLH2=WH2*.2248*1728.*1.1                                         TANK 190
      VOLO2=WO2*.01404*1728.*1.05                                       TANK 200
      RADH2=(3.*VOLH2/(4.*3.1416))**.3333                               TANK 210
      RADO2=(3.*VOLO2/(4.*3.1416))**.3333                               TANK 220
      SURAH2=4.*3.1416*RADH2**2.                                        TANK 230
      SURAO2=4.*3.1416*RADO2**2.                                        TANK 240
C   TANK THICKNESS                                                      TANK 250
      TH2=PBH2*RADH2/(2.*64000.)                                        TANK 260
      IF(TH2.LT.0.04) TH2=0.04                                          TANK 270
      TO2=PBO2*RADO2/(2.*64000.)                                        TANK 280
      IF(TO2.LT.0.04) TO2=0.04                                          TANK 290
C   TANK WEIGHT AND SUPPORT (NON-OPTIMUM FACTOR IS 1.1)                 TANK 300
      WTH2=SURAH2*TH2*.101*1.1                                          TANK 310
      WTSH2=0.1*VOLH2/1728.                                             TANK 320
      WTO2=SURAO2*TO2*.101*1.1                                          TANK 330
      WTSO2=10.*2.*RADO2/12.                                            TANK 340
C   H2 TANK FOAM                                                        TANK 350
      WFH2=SURAH2*.42*2.5/1728.                                         TANK 360
C   COOLING SHROUD (8 DAY MISSION)                                      TANK 370
      WVRH2=WVH2/(8.*24.)                                               TANK 380
      N1=WVRH2/.45*14.                                                  TANK 390
      N1=AINT(N1)+1.0                                                   TANK 400
      N2=WVRH2/.45*9.                                                   TANK 410
      N2=AINT(N2)+1.0                                                   TANK 420
      IF(WH2.LT.1.0) N2=9.                                              TANK 425
      TUBCSA=3.1416/4.*((.125**2.)-(.105**2.))+2.*.188*.01              TANK 430
      WCTH2=TUBCSA*(3.1416*RADH2*N1)*.101                               TANK 440
      WCTH2=4.+WCTH2                                                    TANK 450
      WCTO2=TUBCSA*(3.1416*RADO2*N2)*.101                               TANK 460
      WCTO2=4.+WCTO2                                                    TANK 470
      WCSH2=SURAH2*.005*.101                                            TANK 480
      WCSO2=SURAO2*.001*.101                                            TANK 490
C   INSULATION AND SUPPORT                                              TANK 500
      WIH2=SURAH2*.68*5./1728.*1.1                                      TANK 510
      WIO2=SURAO2*.97*5./1728.*1.1                                      TANK 520
C   FIBERGLASS AND SUPPORT                                              TANK 530
      WFGH2=SURAH2*.02*.067*1.45                                        TANK 540
      WFGO2=SURAO2*.02*.067*1.45                                        TANK 550
C   ACQUISITION DEVICE                                                  TANK 560
      WADH2=17.+.250*SURAH2/144.                                        TANK 570
      WADO2=17.+.250*SURAO2/144.                                        TANK 580
C   TOTAL TANK WEIGHT                                                   TANK 590
      WTTH2=WTH2+WTSH2+WFH2+WCTH2+WCSH2+WIH2+WFGH2+WADH2                TANK 600
      WTTO2=WTO2+WTSO2+WCTO2+WCSO2+WIO2+WFGO2+WADO2                     TANK 610
      IF(WH2.LT.1.0)WTTH2=0.0                                           TANK 615
      PTH=WTTH2                                                         TANK 620
      IF(WO2.LT.1.0) WTTO2=0.0                                          TANK 625
      PTO=WTTO2                                                         TANK 630
      WH2=WH2                                                           TANK 640
      WO2=WO2                                                           TANK 650
      RETURN                                                            TANK 660
      END                                                               TANK 670
      SUBROUTINE PRESYS(PTO2,PTH2,TH2,TO2,WH2,WO2)                      PRES   0
C....VERSION 26 JUNE 70 .....                                           PRES  10
      DATA VPO0,VPO1,VPO2/16.6430,-1.57154E-2,-1855.15/ ,VPH0,VPH1,VPH2/PRES  20
     15.61162,4.16704E-2,-163.182/                                      PRES  30
      XWH2=WH2                                                          PRES  32
      XWO2=WO2                                                          PRES  35
C   HELIUM DENSITIES                                                    PRES  40
C    HYDROGEN SIDE                                                      PRES  50
      VPH=EXP(VPH0+VPH1*TH2+VPH2/TH2)                                   PRES  60
      P=PTH2-VPH                                                        PRES  70
      RHO=0.                                                            PRES  80
      CALL PROPHE(TH2,P,RHO,0.,0.,0.)                                   PRES  90
      RHEHTI=RHO                                                        PRES 100
C    OXYGEN SIDE                                                        PRES 110
      P=3000.                                                           PRES 120
      RHO=0.                                                            PRES 130
      CALL PROPHE(TO2,P,RHO,0.,0.,0.)                                   PRES 140
      RHEOI=RHO                                                         PRES 150
      P=100.                                                            PRES 160
      RHO=0.                                                            PRES 170
      CALL PROPHE(TO2,P,RHO,0.,0.,0.)                                   PRES 180
      RHEOF=RHO                                                         PRES 190
      VPO=EXP(VPO0+VPO1*TO2+VPO2/TO2)                                   PRES 200
      P=PTO2-VPO                                                        PRES 210
      RHO=0.                                                            PRES 220
      CALL PROPHE(TO2,P,RHO,0.,0.,0.)                                   PRES 230
      RHEOTF=RHO                                                        PRES 240
C   PROPELLANT TANK VOLUMES (H2-INITIAL,10 PERCENT ULLAGE;O2-FINAL)     PRES 250
      VOLH2=WH2*.2248*1728.*.1                                          PRES 260
      RO2=0.0                                                           PRES 270
      CALL PROLO2 (TO2,PTO2,RO2,0.,0.)                                  PRES 280
      VOLO2=WO2/RO2                                                     PRES 290
C   HELIUM VOLUMES                                                      PRES 300
      VOLHEH=VOLH2                                                      PRES 310
      VOLHEO=(RHEOTF*VOLO2)/(RHEOI-RHEOF)                               PRES 320
C   PREPRESSURANT AND PUMP (3 REQD.) WEIGHTS-HYDROGEN SIDE              PRES 330
      WH2=3.*24.2+VOLHEH*RHEHTI                                         PRES 340
      IF(XWH2.LT.1.0) WH2=0.0                                           PRES 345
C   PRESSURANT AND PRESSURANT TANK WEIGHTS-OXYGEN SIDE                  PRES 350
      PBVO2=2.22*3000.*VOLHEO                                           PRES 360
      WO2=EXP(-12.939+.9821*ALOG(PBVO2))                                PRES 370
      WO2=WO2+VOLHEO*RHEOI                                              PRES 380
      IF(XWO2.LT.1.0) WO2=0.0                                           PRES 385
      RETURN                                                            PRES 390
      END                                                               PRES 400
      SUBROUTINE PROFH2 (T,P,RHO,H,S)                                   PROF   0
C     T(DEG R)  P(PSIA)  RHO(LBM/CU.IN) H(BTU/LBM)   (BTU/LBM DEG R)    PROF  10
      DIMENSION A(17),B(17),AS(4),A1(17)                                PROF  20
      COMMON/BLK1/A1                                                    PROF  30
      COMMON/PROPS/GAMMA,CPP,CV,C0,DPDR                                 PROF  40
      DATA A0,G,C,D,E,F/4.977816011,-.003384077523,.0003521443738, -.143PROF  50
     15633178E-4,.2303247505E-6,-.1038316229E-8/                        PROF  60
      DATA (A(I),I=1,17)/82.08199823,20.62278898,-129279.2029,-7237230.1PROF  70
     137,115924274.5,-.1010879875E11,317.6293970,2581305.967,241066.9065PROF  80
     2,-.1070380625E11,.1016369054E13,-.1938431002E14,.3857308627E13, -.PROF  90
     36757463236E15,.1462114653E17,.5254992259E11,1800.1008/            PROF 100
      DATA (B(I),I=1,17)/82.08199823,63.74020840,-353918.0407,-4810952.4PROF 110
     157,91278833.49,-8816106422.,-1283.735749,8076213.444,1425160.973, PROF 120
     26410245277.,.1085162913E12,-.2930340262E13,-.5235483345E13, -.2551PROF 130
     3114380E15,.4732799310E16,.3522327774E11,.1800100800E04/           PROF 140
C   SATURATION CORRECTION 21 OCT 70                                     PROF 150
      DATA PC,TC,RHOC/12.770,32.984,0.0152672/,AP,BP,CP,DP,EP/1.89865, 3PROF 160
     1.60610E-5,-3.61339E-3,.181318,-88.9613/,AS1,AS2,AS3,AS4/.62675345EPROF 170
     2-2,.14973511E-2,-.18306903E-3,-.20693181E-4/                      PROF 180
      DATA C1,C2,C3,C4,C5,C6,C7/-253.29,1.87850E-3,-.177648,7.91029, 2.5PROF 190
     13018E-22,7.18905E-26,-8.52463E-24/                                PROF 200
      DATA GS,BS,CS,DS,ES,FS/-2.07580,3.16280E-5,-3.57256E-3,.197685, 9.PROF 210
     158870E-26,-1.55441E-27/                                           PROF 220
      DATA AT1,AT2,AT3,AT4,AT5/.147246,-1.00145E10,9.31575E7,-223720, 27PROF 230
     12.870/                                                            PROF 240
      DATA VWA,VWB/2.4483E5,26.661 /                                    PROF 250
      IND=1                                                             PROF 260
      GO TO 100                                                         PROF 270
      ENTRY PROPH2                                                      PROF 280
      IND=0                                                             PROF 290
  100 IF(T.LT.540.) GO TO 110                                           PROF 300
      CALL PRPH2 (T,P,RHO,H,S,U)                                        PROF 310
      RETURN                                                            PROF 320
  110 T=T/1.8                                                           PROF 330
      P=P/14.696                                                        PROF 340
      RHO=RHO*1728./(62.428227*2.01572)                                 PROF 350
      DO 120 I=1,17                                                     PROF 360
  120 A1(I)=A(I)                                                        PROF 370
      IF(ABS(P).LT.1.0E-5) GO TO 210                                    PROF 380
      IF(ABS(T).LT.1.0E-5) GO TO 160                                    PROF 390
C     SOLUTION FOR RHO                                                  PROF 400
      IF (T.GE.TC) GO TO 140                                            PROF 410
      PSAT=EXP(AP+((BP*T+CP)*T+DP)*T+EP/T)                              PROF 420
      IF (P.LE.PSAT) GO TO 140                                          PROF 430
      GO TO 270                                                         PROF 440
  140 K=0                                                               PROF 450
      SA=A1(1)*A1(2)*T+A1(3)+A1(4)/T+A1(5)/(T*T)+A1(6)/(T**4)           PROF 460
      SB=A1(1)*T                                                        PROF 470
      SC=-P                                                             PROF 480
      RHO=(-SB+SQRT(ABS(SB*SB-4.*SA*SC)))/(2.*SA)                       PROF 490
      IF (P.LE.PC) GO TO 150                                            PROF 500
      IF (P.GE.60.) RHO=P/(A(1)*T)                                      PROF 510
      IF (T.LE.40.)RHO=(AL1+T*1.8*(AL2+AL3*T*1.8)+P*14.7*(AL4+AL5*T*1.8)PROF 520
     1)/(62.43*2.01572)                                                 PROF 530
  150 RHO0=RHO-FUNCT(P,T,RHO)/DFDR(P,T,RHO)                             PROF 540
      IF(ABS((RHO0-RHO)/RHO).LT.1.0E-7) GO TO 230                       PROF 550
      K=K+1                                                             PROF 560
      IF (K.GT.20) GO TO 250                                            PROF 570
      RHO=RHO0                                                          PROF 580
      GO TO 150                                                         PROF 590
C     SOLUTION FOR TEMP                                                 PROF 600
  160 PP=FUNCT (0.0,300.,RHO)                                           PROF 610
      IF (PP.GT.P) GO TO 170                                            PROF 620
      P=P*14.696                                                        PROF 630
      RHO=RHO*62.428227*2.01572/1728.                                   PROF 640
      CALL PRPH2 (T,P,RHO,H,S,U)                                        PROF 650
      RETURN                                                            PROF 660
  170 IF (RHO.LE.RHOC) GO TO 180                                        PROF 670
      PP=FUNCT(0.,33.,RHO)                                              PROF 680
      IF (P.GE.PP) GO TO 180                                            PROF 690
      GO TO 270                                                         PROF 700
  180 T=(P+VWA*(RHO*RHO))*(1./RHO-VWB)/A(1)                             PROF 710
      K=0                                                               PROF 720
  190 T0=T-FUNCT(P,T,RHO)/DFDT(P,T,RHO)                                 PROF 730
      IF (ABS((T0-T)/T).LT.1.0E-5) GO TO 230                            PROF 740
      K=K+1                                                             PROF 750
      IF(K.GT.100) GO TO 250                                            PROF 760
      T=T0                                                              PROF 770
      GO TO 190                                                         PROF 780
C     SOLUTION FOR PRESS                                                PROF 790
  210 IF (T.GE.TC) GO TO 220                                            PROF 800
      IF (RHO.LE.RHOC) GO TO 220                                        PROF 810
      GO TO 270                                                         PROF 820
  220 P=FUNCT(0.,T,RHO)                                                 PROF 830
  230 Z=P/(A(1)*T*RHO)                                                  PROF 840
      IF ((P/Z).LT.0.0) GO TO 250                                       PROF 850
C     CALCULATE ENTHALPY                                                PROF 860
      RHO2=RHO**2                                                       PROF 870
      EX=EXP(-A(17)*RHO2)                                               PROF 880
      T0=20.268                                                         PROF 890
      IF(T.GT.100.) GO TO 240                                           PROF 900
      T1=T-20.268                                                       PROF 910
      H=(50.177)*2.01572+A0*T1+G*(T*T-T0*T0)/2.+C*(T**3-T0**3)/3.+D*(T**PROF 920
     14-T0**4)/4.+E*(T**5-T0**5)/5.+F*(T**6-T0**6)/6.+(A(1)*T*(Z-1.)+ A(PROF 930
     23)*RHO+2.*A(4)*RHO/T+3.*A(5)*RHO/T**2+5.*A(6)*RHO/T**4+ A(8)*RHO2/PROF 940
     32.+(3.*A(10)/T**2+4.*A(11)/T**3+5.*A(12)/T**4)/(-2.*A(17))*(EX-1.)PROF 950
     4+(3.*A(13)/T**2+4.*A(14)/T**3+5.*A(15)/T**4)/(-2.*A(17))*(EX*(RHO2PROF 960
     5+1./A(17))-1./A(17))+A(16)*RHO**5/5.)*.024215                     PROF 970
C     CALCULATE ENTROPY                                                 PROF 980
      S=(7.319)*2.01572+A0*ALOG(T/T0)+G*T1+C*(T*T-T0*T0)/2.+D*(T**3-T0**PROF 990
     13)/3.+E*(T**4-T0**4)/4.+F*(T**5-T0**5)/5.+(-A(1)*ALOG(P/Z)- A(1)*APROF1000
     2(2)*RHO+A(4)*RHO/T**2+2.*A(5)*RHO/T**3+4.*A(6)*RHO/T**5- A(7)*A(1)PROF1010
     3*RHO2/2.-A(9)*RHO**3/3.+(2.*A(10)/T**3+3.*A(11)/T**4+4.*A(12)/T**5PROF1020
     4)*1.0/(-2.*A(17))*(EX-1.)+(2.*A(13)/T**3+3.*A(14)/T**4+ 4.*A(15)/TPROF1030
     5**5)/(-2.*A(17))*(EX*(RHO2+1./A(17))-1./A(17)))*.024215           PROF1040
      U=H-(P/RHO)*.024215                                               PROF1050
      CP0=A0+T*(G+T*(C+T*(D+T*(E+T*F))))                                PROF1060
      GO TO 350                                                         PROF1070
  240 H=50.177*2.01572+A0*(100.-T0)+G*(100.*100.-T0*T0)/2.+C*(100.**3-T0PROF1080
     1**3)/3.+D*(100.**4-T0**4)/4.+E*(100.**5-T0**5)/5.+F*(100.**6-T0**6PROF1090
     2)/6.+13.4408*(T-100.)-.378855*(T*T-100.*100.)/2.+5.85297E-3*(T*T*TPROF1100
     3-100.**3)/3.-3.72881E-5*(T**4-100.**4)/4.+1.06569E-7*(T**5-100.**5PROF1110
     4)/5.-1.13579E-10*(T**6-100.**6)/6.+(A(1)*T*(Z-1.)+ A(3)*RHO+2.*A(4PROF1120
     5)*RHO/T+3.*A(5)*RHO/T**2+5.*A(6)*RHO/T**4+ A(8)*RHO2/2.+(3.*A(10)/PROF1130
     6T**2+4.*A(11)/T**3+5.*A(12)/T**4)/(-2.*A(17))*(EX-1.)+(3.*A(13)/T*PROF1140
     7*2+4.*A(14)/T**3+5.*A(15)/T**4)/(-2.*A(17))*(EX*(RHO2+1./A(17))-1.PROF1150
     8/A(17))+A(16)*RHO**5/5.)*.024215                                  PROF1160
      S=7.319*2.01572+A0*ALOG(100./T0)+G*(100.-T0)+C*(100.*100.-T0*T0)/2PROF1170
     1.+D*(100.**3-T0**3)/3.+E*(100.**4-T0**4)/4.+F*(100.**5-T0**5)/5.+ PROF1180
     213.4408*ALOG(T/100.)-.378855*(T-100.)+5.85297E-3*(T*T-100.*100.)/2PROF1190
     3.-3.72881E-5*(T**3-100.**3)/3.+1.06569E-7*(T**4-100.**4)/4. -1.135PROF1200
     479E-10*(T**5-100.**5)/5.+(-A(1)*ALOG(P/Z)- A(1)*A(2)*RHO+A(4)*RHO/PROF1210
     5T**2+2.*A(5)*RHO/T**3+4.*A(6)*RHO/T**5- A(7)*A(1)*RHO2/2.-A(9)*RHOPROF1220
     6**3/3.+(2.*A(10)/T**3+3.*A(11)/T**4+4.*A(12)/T**5)*1.0/(-2.*A(17))PROF1230
     7*(EX-1.)+(2.*A(13)/T**3+3.*A(14)/T**4+ 4.*A(15)/T**5)/(-2.*A(17))*PROF1240
     8(EX*(RHO2+1./A(17))-1./A(17)))*.024215                            PROF1250
      U=H-(P/RHO)*.024215                                               PROF1260
      CP0=13.4408+T*(-.378855+T*(5.85297E-3+T*(-3.72881E-5+T*(1.06569E-7PROF1270
     1-T*1.13579E-10))))                                                PROF1280
      GO TO 350                                                         PROF1290
  250 WRITE (6,260) T,P,RHO                                             PROF1300
  260 FORMAT (35H SUBROUTINE PROPH2 DID NOT CONVERGE,3E13.4/)           PROF1310
      GO TO 350                                                         PROF1320
      ENTRY PROSH2                                                      PROF1330
      T=T/1.8                                                           PROF1340
      P=P/14.696                                                        PROF1350
      RHO=RHO*1728./(62.428227*2.01572)                                 PROF1360
C     SWITCH CONSTANTS                                                  PROF1370
  270 DO 280 I=1,17                                                     PROF1380
  280 A1(I)=B(I)                                                        PROF1390
      IF (ABS(P).LT.1.0E-5) GO TO 330                                   PROF1400
      IF (ABS(T).LT.1.0E-5) GO TO 300                                   PROF1410
      K=0                                                               PROF1420
      RHO=AL1+T*1.8*(AL2+AL3*T*1.8)+P*14.7*(AL4+T*1.8*AL5)              PROF1430
      RHO=RHO/(62.43*2.016)                                             PROF1440
  290 RHO0=RHO-FUNCT(P,T,RHO)/DFDR(P,T,RHO)                             PROF1450
      IF(ABS((RHO0-RHO)/RHO).LT.1.0E-7) GO TO 340                       PROF1460
      K=K+1                                                             PROF1470
      IF (K.GT.20) GO TO 250                                            PROF1480
      RHO=RHO0                                                          PROF1490
      GO TO 290                                                         PROF1500
C     SOLUTION FOR TEMP                                                 PROF1510
  300 TA=-AL2-AL5*P*14.696                                              PROF1520
      TB=SQRT (TA**2-4.*AL3*(AL1+AL4*P*14.696-RHO*62.428*2.01572))      PROF1530
      T=(TA-TB)/(2.*AL3*1.8)                                            PROF1540
      K=0                                                               PROF1550
  310 T0=T-FUNCT(P,T,RHO)/DFDT(P,T,RHO)                                 PROF1560
      IF(ABS((T0-T)/T).LT.1.0E-7) GO TO 340                             PROF1570
      K=K+1                                                             PROF1580
      IF(K.GT.100) GO TO 250                                            PROF1590
      T=T0                                                              PROF1600
      GO TO 310                                                         PROF1610
C     SOLUTION FOR PRESS                                                PROF1620
  330 P=FUNCT(0.,T,RHO)                                                 PROF1630
  340 CONTINUE                                                          PROF1640
C   CALCULATE COMPRESSED LIQUID ENTHALPY/ENTROPY                        PROF1650
      RHOS=RHOC+AS1*(TC-T)**.3333+AS2*(TC-T)**.6667+AS3*(TC-T) +AS4*(TC-PROF1660
     1T)**1.3333                                                        PROF1670
      PSAT=EXP(AP+((BP*T+CP)*T+DP)*T+EP/T)                              PROF1680
      T18=T*1.8                                                         PROF1690
      HSAT=(C1+T18*(C4+T18*(C3+T18*C2))+EXP(T18)*(C5+T18*(C7+T18*C6))) *PROF1700
     12.01572/1.8                                                       PROF1710
      SSAT=GS+((BS*T18+CS)*T18+DS)*T18+EXP(T18)*(ES+FS*T18)             PROF1720
      SSAT=SSAT*2.01572                                                 PROF1730
      H1=HINT(RHO,T)                                                    PROF1740
      H2=HINT(RHOS,T)                                                   PROF1750
      H=HSAT+H1-H2+(P/RHO-PSAT/RHOS)*.024215                            PROF1760
      S1=SINT (RHO,T)                                                   PROF1770
      S2=SINT (RHOS,T)                                                  PROF1780
      S=SSAT+S1-S2                                                      PROF1790
      U=H-(P/RHO)*.024215                                               PROF1800
  350 IF (IND.EQ.0) GO TO 360                                           PROF1810
      CV0=CP0-A(1)*.024215                                              PROF1820
      CV=(CV0+CVINT(P,T,RHO)*.024215)/2.01572                           PROF1830
      DPDT=DFDT(P,T,RHO)                                                PROF1840
      DPDR=DFDR(P,T,RHO)                                                PROF1850
      CPP=CV+T*DPDT*DPDT/(RHO*RHO*DPDR)*.024215/2.01572                 PROF1860
      GAMMA=CPP/CV                                                      PROF1870
      C0=SQRT(GAMMA*DPDR*1.013E2/2.01572)*3.281                         PROF1880
      DPDR=DPDR/2.01572*.024215*1.8                                     PROF1890
  360 T=T*1.8                                                           PROF1900
      P=P*14.696                                                        PROF1910
      RHO=RHO*62.428227*2.01572/1728.                                   PROF1920
      H=H*1.798823/2.01572                                              PROF1930
      S=S*1.798823/(2.01572*1.8)                                        PROF1940
      U=U*1.798823/2.01572                                              PROF1950
      RETURN                                                            PROF1960
      ENTRY PROLH2                                                      PROF1970
      DATA AL1,AL2,AL3,AL4,AL5/4.29069,4.77338E-2,-1.21856E-3, -7.35483EPROF1980
     1-4,3.67721E-5/,H1,H2,H3,H4,H5/-880.99,101.419,-3.57316, 0.056438 ,PROF1990
     2-3.45366E-4/                                                      PROF2000
      RHO=RHO*1728.                                                     PROF2010
      IF(T.LT.1.0E-5) GO TO 370                                         PROF2020
      IF(P.LT.1.0E-5) GO TO 380                                         PROF2030
      RHO=AL1+T*(AL2+T*AL3)+P*(AL4+T*AL5)                               PROF2040
      GO TO 390                                                         PROF2050
  370 TA=-AL2-AL5*P                                                     PROF2060
      TB=SQRT(( TA**2)-4.*AL3*(AL1+AL4*P-RHO))                          PROF2070
      T=(TA-TB)/(2.*AL3)                                                PROF2080
      GO TO 390                                                         PROF2090
  380 P=(RHO-AL1-T*(AL2+AL3*T))/(AL4+AL5*T)                             PROF2100
  390 H=H1+T*(H2+T*(H3+T*(H4+T*H5)))                                    PROF2110
      RHO=RHO/1728.                                                     PROF2120
      RETURN                                                            PROF2130
      END                                                               PROF2140
      FUNCTION HINT (RHO,T)                                             HINT   0
      COMMON/BLK1/A(17)                                                 HINT  10
      RHO2=RHO*RHO                                                      HINT  20
      EX=EXP(-A(17)*RHO2)                                               HINT  30
      T2=T*T                                                            HINT  40
      HINT=A(3)*RHO+2.*A(4)*RHO/T+3.*A(5)*RHO/T2+5.*A(6)*RHO/(T2*T2) +A(HINT  50
     18)*RHO2/2.+(3.*A(10)/T2+4.*A(11)/(T*T2)+5.*A(12)/(T2*T2))/ (-2.*A(HINT  60
     217))*EX +(3.*A(13)/T2+4.*A(14)/(T*T2)+5.*A(15)/(T2*T2))/ (-2.*A(17HINT  70
     3))*EX *(RHO2+1./A(17))+A(16)*RHO**5/5.                            HINT  80
      HINT=HINT*.024215                                                 HINT  90
      RETURN                                                            HINT 100
      END                                                               HINT 110
      FUNCTION SINT (RHO,T)                                             SINT   0
      COMMON/BLK1/A(17)                                                 SINT  10
      RHO2=RHO*RHO                                                      SINT  20
      EX=EXP(-A(17)*RHO2)                                               SINT  30
      T2=T*T                                                            SINT  40
      SINT= (-A(1)*A(2)+((4.*A(6)/T2+2.*A(5))/T+A(4))/T2)*RHO -A(1)*ALOGSINT  50
     1(RHO) -RHO2*(A(7)*A(1)/2.+A(9)*RHO/3.)+(((4.*A(12)/T+3.*A(11))/T+2SINT  60
     2.*A(10))/(T*T2))*EX/(-2.*A(17))+(((4.*A(15)/T+3.*A(14))/T+2.*A(13)SINT  70
     3)/ (T*T2))*EX/(-2.*A(17))*(RHO2+1./A(17))                         SINT  80
      SINT=SINT*.024215                                                 SINT  90
      RETURN                                                            SINT 100
      END                                                               SINT 110
      FUNCTION FUNCT(P,T,RHO)                                           FUNC   0
C..............VERSION 23 JAN 70.................                       FUNC  10
      DIMENSION A(17)                                                   FUNC  20
      COMMON/BLK1/A                                                     FUNC  30
      RHO2=RHO**2                                                       FUNC  40
      RHO3=RHO**3                                                       FUNC  50
      RHO5=RHO**5                                                       FUNC  60
      EX=EXP(-A(17)*RHO2)                                               FUNC  70
      F=-P+A(1)*T*RHO+A(1)*A(2)*T*RHO2+A(3)*RHO2+A(4)*RHO2/T+A(5)*RHO2/(FUNC  80
     1T*T)+A(6)*RHO2/T**4+A(7)*A(1)*T*RHO3+A(8)*RHO3+A(9)*T*RHO2*RHO2 +AFUNC  90
     2(10)*RHO3*EX/T**2+A(11)*RHO3*EX/T**3+A(12)*RHO3*EX/T**4+A(13)*RHO5FUNC 100
     3*EX/(T*T)+A(14)*RHO5*EX/T**3+A(15)*RHO5*EX/T**4+A(16)*RHO**6      FUNC 110
      FUNCT=F                                                           FUNC 120
      RETURN                                                            FUNC 130
      END                                                               FUNC 140
      FUNCTION DFDR(P,T,RHO)                                            DFDR   0
C..............VERSION 23 JAN 70.................                       DFDR  10
      DIMENSION A(17)                                                   DFDR  20
      COMMON/BLK1/A                                                     DFDR  30
      RHO2=RHO**2                                                       DFDR  40
      RHO3=RHO**3                                                       DFDR  50
      RHO5=RHO**5                                                       DFDR  60
      EX=EXP(-A(17)*RHO2)                                               DFDR  70
      FR=A(1)*T+2.*A(1)*A(2)*T*RHO+2.*A(3)*RHO+2.*A(4)*RHO/T+2.*A(5)*RHODFDR  80
     1/(T*T)+2.*A(6)*RHO/T**4+A(7)*A(1)*T*3.*RHO2+3.*A(8)*RHO2+4.*A(9)*TDFDR  90
     2*RHO3+(A(10)/(T*T)+A(11)/T**3+A(12)/T**4)*RHO2*EX*(3.-2.*A(17)*RHODFDR 100
     32)+(A(13)/(T*T)+A(14)/T**3+A(15)/T**4)*RHO2*RHO2*EX*(5.-2.*A(17)*RDFDR 110
     4HO2)+6.*RHO5*A(16)                                                DFDR 120
      DFDR=FR                                                           DFDR 130
      RETURN                                                            DFDR 140
      END                                                               DFDR 150
      FUNCTION DFDT(P,T,RHO)                                            DFDT   0
C..............VERSION 23 JAN 70.................                       DFDT  10
      DIMENSION A(17)                                                   DFDT  20
      COMMON/BLK1/A                                                     DFDT  30
      RHO2=RHO**2                                                       DFDT  40
      RHO3=RHO**3                                                       DFDT  50
      RHO5=RHO**5                                                       DFDT  60
      EX=EXP(-A(17)*RHO2)                                               DFDT  70
      FT=A(1)*RHO+A(1)*A(2)*RHO2-A(4)*RHO2/(T*T)-2.*A(5)*RHO2/T**3 -4.*ADFDT  80
     1(6)*RHO2/T**5+A(7)*A(1)*RHO3+A(9)*RHO2*RHO2-2.*A(10)*RHO3*EX/T**3-DFDT  90
     23.*A(11)*RHO3*EX/T**4-4.*A(12)*RHO3*EX/T**5-2.*A(13)*RHO5*EX/T**3-DFDT 100
     33.*A(14)*RHO5*EX/T**4-4.*A(15)*RHO5*EX/T**5                       DFDT 110
      DFDT=FT                                                           DFDT 120
      RETURN                                                            DFDT 130
      END                                                               DFDT 140
      SUBROUTINE PROFO2 (T,P,RHO,H,S)                                   PROF   0
C     T(DEG R)  P(PSIA)  RHO(LBM/CU.IN) H(BTU/LBM)   (BTU/LBM DEG R)    PROF  10
C   VERSION 21 AUGUST 70                                                PROF  20
      DIMENSION A(17)                                                   PROF  30
      COMMON/BLK1/A1(17)                                                PROF  40
      COMMON/PROPS/GAMMA,CPP,CV,C0,DPDR                                 PROF  50
      DATA A0,B,C,D,E,F/6.91726,-5.58681E-4,4.83537E-6,-3.70490E-9, 8.48PROF  60
     1173E-13,0.0/                                                      PROF  70
      DATA (A(I),I=1,17)/0.0820797,.036684115,-1.0091340,-59.581958, -39PROF  80
     109.1633,12405065.,.87258515E-3,-.011885929,0.29165708E-5, 1247.356PROF  90
     22,-61007.363,-4618517.8,-1.0379526,661.83734,-22051.320, .73071820PROF 100
     3E-6,.0037656816/                                                  PROF 110
      DATA AL1,AL2,AL3,AL4,AL5/0.48926E02,-.15300,0.66752E-4, -0.17219E-PROF 120
     12,0.91185E-4/,H1,H2,H3,H4,H5/634.733,-15.0716,.217438, -1.43307E-3PROF 130
     2,3.34014E-6/                                                      PROF 140
      DATA AP,BP,CP,DP,EP/.13750055E-3,-0.054998814,6.6564191,1.7023470,PROF 150
     1-945.12173/,PC,TC/49.735,85.00/,RHOC/13.5/                        PROF 160
      DATA C1,C2,C3,C4,C5,C6,C7/ 892.824,1.34216E-9,-7.76702E-7, 1.84527PROF 170
     1E-4,-2.3049E-2,1.60151,-57.2877/                                  PROF 180
      DATA AS,BS,CS,DS,ES,FS/-2.42682,4.63751E-10,-2.23106E-7,4.21121E-5PROF 190
     1,-3.95735E-3,.206805/                                             PROF 200
      DATA AT1,AT2/1164.87,.192944/                                     PROF 210
      DATA VWA,VWB/1.3645,.03184/                                       PROF 220
      IND=1                                                             PROF 230
      GO TO 100                                                         PROF 240
      ENTRY PROPO2                                                      PROF 250
      IND=0                                                             PROF 260
  100 IF(T.LT.540.) GO TO 110                                           PROF 270
      CALL PRPO2 (T,P,RHO,H,S,U)                                        PROF 280
      RETURN                                                            PROF 290
  110 T=T/1.8                                                           PROF 300
      P=P/14.696                                                        PROF 310
      RHO=RHO*1728.*1000./(62.428227*32.00)                             PROF 320
      DO 120 I=1,17                                                     PROF 330
  120 A1(I)=A(I)                                                        PROF 340
      IF(ABS(T).LT.1.0E-5) GO TO 190                                    PROF 350
      IF(ABS(P).LT.1.0E-5) GO TO 280                                    PROF 360
C     SOLVE FOR RHO                                                     PROF 370
      IF (T.GE.155.) GO TO 140                                          PROF 380
      PSAT=EXP((AP*T+BP)*T+CP+DP*ALOG(T)+EP/T)                          PROF 390
      IF (P.LE.PSAT) GO TO 140                                          PROF 400
      IF (T.GE.TC) GO TO 160                                            PROF 410
      GO TO 400                                                         PROF 420
  140 SA=A1(1)*A1(2)*T+A1(3)+A1(4)/T+A1(5)/(T*T)+A1(6)/(T**4)           PROF 430
      SB=A1(1)*T                                                        PROF 440
      SC=-P                                                             PROF 450
      RHO0=(-SB+SQRT(ABS(SB*SB-4.*SA*SC)))/(2.*SA)                      PROF 460
      IF((SB*SB-4.*SA*SC).LT.0.0) RHO0=P/(.2*A1(1)*T)                   PROF 470
      K=0                                                               PROF 480
  150 RHO=RHO0-FUNCT(P,T,RHO0)/DFDR(P,T,RHO0)                           PROF 490
      IF(ABS((RHO0-RHO)/RHO).LT.1.0E-7) GO TO 300                       PROF 500
      K=K+1                                                             PROF 510
      IF(K.GT.100) GO TO 350                                            PROF 520
      RHO0=RHO                                                          PROF 530
      GO TO 150                                                         PROF 540
  160 RHO1=RHOC                                                         PROF 550
      P1=FUNCT(0.,T,RHO1)                                               PROF 560
      RHO2=100.*RHOC                                                    PROF 570
      P2=FUNCT(0.,T,RHO2)                                               PROF 580
      K=0                                                               PROF 590
  170 RHO=(RHO1+RHO2)/2.                                                PROF 600
      P0=FUNCT (0.,T,RHO)                                               PROF 610
      IF (ABS((P-P0)/P).LE.1.0E-4) GO TO 300                            PROF 620
      K=K+1                                                             PROF 630
      IF (K.GT.50) GO TO 350                                            PROF 640
      IF((P-P0)*(P-P1).LE.0.0) GO TO 180                                PROF 650
      P1=P0                                                             PROF 660
      RHO1=RHO                                                          PROF 670
      GO TO 170                                                         PROF 680
  180 P2=P0                                                             PROF 690
      RHO2=RHO                                                          PROF 700
      GO TO 170                                                         PROF 710
C     SOLVE FOR TEMPERATURE                                             PROF 720
  190 PP=FUNCT (0.0,300.,RHO)                                           PROF 730
      IF (PP.GT.P) GO TO 200                                            PROF 740
      P=P*14.696                                                        PROF 750
      RHO=RHO*62.428227*32.00/(1728.*1000.)                             PROF 760
      CALL PRPO2 (T,P,RHO,H,S,U)                                        PROF 770
      RETURN                                                            PROF 780
  200 IF (RHO.GT.RHOC) GO TO 210                                        PROF 790
      PP=FUNCT (0.,155.,RHO)                                            PROF 800
      IF (P.LT.PP) GO TO 270                                            PROF 810
      GO TO 220                                                         PROF 820
  210 PP=FUNCT (0.,155.,RHO)                                            PROF 830
      IF (P.GT.PP) GO TO 220                                            PROF 840
      RSW=AT1+AT2*P                                                     PROF 850
      RSW=RSW/32.                                                       PROF 860
      IF (RHO.GT.RSW ) GO TO 400                                        PROF 870
      GO TO 240                                                         PROF 880
  220 T0=(P+VWA*(RHO*RHO))*(1./RHO-VWB)/A(1)                            PROF 890
      K=0                                                               PROF 900
  230 T=T0-FUNCT(P,T0,RHO)/DFDT(P,T0,RHO)                               PROF 910
      IF (ABS((T0-T)/T).LT.1.0E-5) GO TO 300                            PROF 920
      K=K+1                                                             PROF 930
      IF(K.GT.100) GO TO 350                                            PROF 940
      T0=T                                                              PROF 950
      GO TO 230                                                         PROF 960
C   BISECTION METHOD                                                    PROF 970
  240 P1=FUNCT (0.,85.,RHO)                                             PROF 980
      P2=FUNCT (0.,155.,RHO)                                            PROF 990
      T1=85.                                                            PROF1000
      T2=155.                                                           PROF1010
      K=0                                                               PROF1020
  250 T=(T1+T2)/2.                                                      PROF1030
      P0=FUNCT (0.,T,RHO)                                               PROF1040
      IF (ABS((P-P0)/P).LE.1.0E-4) GO TO 300                            PROF1050
      K=K+1                                                             PROF1060
      IF (K.GT.50) GO TO 350                                            PROF1070
      IF ((P-P0)*(P-P1).LE.0.0) GO TO 260                               PROF1080
      P1=P0                                                             PROF1090
      T1=T                                                              PROF1100
      GO TO 250                                                         PROF1110
  260 P2=P0                                                             PROF1120
      T2=T                                                              PROF1130
      GO TO 250                                                         PROF1140
  270 GO TO 220                                                         PROF1150
C     SOLVE FOR PRESSURE                                                PROF1160
  280 IF (T.GE.TC) GO TO 290                                            PROF1170
      IF (RHO.LE.RHOC) GO TO 290                                        PROF1180
      GO TO 400                                                         PROF1190
  290 P=FUNCT(0.,T,RHO)                                                 PROF1200
C     SOLVE FOR ENTHALPY/ENTROPY                                        PROF1210
  300 Z=P/(A(1)*T*RHO)                                                  PROF1220
      IF (RHO.LE.RHOC) GO TO 310                                        PROF1230
      IF (T.LT.155.) GO TO 320                                          PROF1240
  310 CONTINUE                                                          PROF1250
      IF ((P/Z).LT.0.0) GO TO 350                                       PROF1260
      T0=90.0                                                           PROF1270
      T1=T-90.                                                          PROF1280
      RHO2=RHO**2                                                       PROF1290
      EX=EXP(-A(17)*RHO2)                                               PROF1300
      H=356.42*7.6482+A0*T1+B*(T*T-T0*T0)/2.+C*(T**3-T0**3)/3.+D*(T**4-TPROF1310
     10**4)/4.+E*(T**5-T0**5)/5.+F*(T**6-T0**6)/6.+(A(1)*T*(Z-1.)+ A(3)*PROF1320
     2RHO+2.*A(4)*RHO/T+3.*A(5)*RHO/T**2+5.*A(6)*RHO/T**4+ A(8)*RHO2/2.+PROF1330
     3(3.*A(10)/T**2+4.*A(11)/T**3+5.*A(12)/T**4)/(-2.*A(17))*(EX-1.)+(3PROF1340
     4.*A(13)/T**2+4.*A(14)/T**3+5.*A(15)/T**4)/(-2.*A(17))*(EX*(RHO2+1.PROF1350
     5/A(17))-1./A(17))+A(16)*RHO**5/5.)*24.215                         PROF1360
      S=5.31913*7.6482+A0*ALOG(T/T0)+B*T1+C*(T*T-T0*T0)/2.+D*(T**3-T0**3PROF1370
     1)/3.+E*(T**4-T0**4)/4.+F*(T**5-T0**5)/5.+(-A(1)*ALOG(P/Z)- A(1)*A(PROF1380
     22)*RHO+A(4)*RHO/T**2+2.*A(5)*RHO/T**3+4.*A(6)*RHO/T**5- A(7)*A(1)*PROF1390
     3RHO2/2.-A(9)*RHO**3/3.+(2.*A(10)/T**3+3.*A(11)/T**4+4.*A(12)/T**5)PROF1400
     4*1.0/(-2.*A(17))*(EX-1.)+(2.*A(13)/T**3+3.*A(14)/T**4+ 4.*A(15)/T*PROF1410
     5*5)/(-2.*A(17))*(EX*(RHO2+1./A(17))-1./A(17)))*24.215             PROF1420
      U=H-(P/RHO)*24.215                                                PROF1430
      GO TO 440                                                         PROF1440
  320 PSAT=EXP((AP*T+BP)*T+CP+DP*ALOG(T)+EP/T)                          PROF1450
      RHOS=AL1+T*(AL2+T*AL3)+(AL4+AL5*T)*PSAT                           PROF1460
      K=0                                                               PROF1470
  330 RHOS0=RHOS-FUNCT(PSAT,T,RHOS)/DFDR(PSAT,T,RHOS)                   PROF1480
      IF (ABS((RHOS0-RHOS)/RHOS).LT.1.0E-5) GO TO 340                   PROF1490
      K=K+1                                                             PROF1500
      IF (K.GT.20) GO TO 350                                            PROF1510
      RHOS=RHOS0                                                        PROF1520
      GO TO 330                                                         PROF1530
  340 CONTINUE                                                          PROF1540
      HSAT=(C1+(((((C2*T+C3)*T+C4)*T+C5)*T+C6)*T+C7)*T)*7.6482          PROF1550
      SSAT=((((BS*T+CS)*T+DS)*T+ES)*T+FS)*T+AS                          PROF1560
      SSAT=SSAT*7.6482                                                  PROF1570
      H1=HINT (RHO,T)                                                   PROF1580
      H2=HINT(RHOS,T)                                                   PROF1590
      H=HSAT+(H1-H2)*1000.+(P/RHO-PSAT/RHOS)*24.215                     PROF1600
      S1=SINT(RHO,T)                                                    PROF1610
      S2=SINT(RHOS,T)                                                   PROF1620
      S=SSAT+(S1-S2)*1000.                                              PROF1630
      U=H-(P/RHO)*24.215                                                PROF1640
      GO TO 440                                                         PROF1650
  350 WRITE (6,360) T,P,RHO                                             PROF1660
  360 FORMAT (35H SUBROUTINE PROPO2 DID NOT CONVERGE,3E13.4/)           PROF1670
      GO TO 440                                                         PROF1680
      ENTRY PROLO2                                                      PROF1690
      T=T/1.8                                                           PROF1700
      P=P/14.696                                                        PROF1710
      RHO=RHO*1728.*1000./(62.428227*32.00)                             PROF1720
      IF(T.LT.1.0E-5) GO TO 370                                         PROF1730
      IF(P.LT.1.0E-5) GO TO 380                                         PROF1740
      RHO=AL1+T*(AL2+T*AL3)+P*(AL4+T*AL5)                               PROF1750
      GO TO 390                                                         PROF1760
  370 TA=-AL2-AL5*P                                                     PROF1770
      TB=SQRT(( TA**2)-4.*AL3*(AL1+AL4*P-RHO))                          PROF1780
      T=(TA-TB)/(2.*AL3)                                                PROF1790
      GO TO 390                                                         PROF1800
  380 P=(RHO-AL1-T*(AL2+AL3*T))/(AL4+AL5*T)                             PROF1810
  390 H=H1+T*(H2+T*(H3+T*(H4+T*H5)))                                    PROF1820
      H=H*32.00/4.184                                                   PROF1830
      GO TO 440                                                         PROF1840
      ENTRY PROSO2                                                      PROF1850
      T=T/1.8                                                           PROF1860
      P=P/14.696                                                        PROF1870
      RHO=RHO*1728.*1000./(62.428227*32.00)                             PROF1880
  400 CONTINUE                                                          PROF1890
      IF(T.LT.1.0E-5) GO TO 410                                         PROF1900
      IF(P.LT.1.0E-5) GO TO 420                                         PROF1910
      RHO=AL1+T*(AL2+T*AL3)+P*(AL4+T*AL5)                               PROF1920
      GO TO 430                                                         PROF1930
  410 TA=-AL2-AL5*P                                                     PROF1940
      TB=SQRT(( TA**2)-4.*AL3*(AL1+AL4*P-RHO))                          PROF1950
      T=(TA-TB)/(2.*AL3)                                                PROF1960
      GO TO 430                                                         PROF1970
  420 P=(RHO-AL1-T*(AL2+AL3*T))/(AL4+AL5*T)                             PROF1980
  430 CONTINUE                                                          PROF1990
      PSAT=EXP((AP*T+BP)*T+CP+DP*ALOG(T)+EP/T)                          PROF2000
      RHOS=AL1+T*(AL2+T*AL3)+(AL4+AL5*T)*PSAT                           PROF2010
      HSAT=(C1+(((((C2*T+C3)*T+C4)*T+C5)*T+C6)*T+C7)*T)*7.6482          PROF2020
      SSAT=((((BS*T+CS)*T+DS)*T+ES)*T+FS)*T+AS                          PROF2030
      SSAT=SSAT*7.6482                                                  PROF2040
      AAA=AL4+AL5*T                                                     PROF2050
      S=((AAA*(AL2+2.*AL3*T)-(AL1+AL2*T+AL3*T*T)*AL5)*(1./RHOS-1./RHO)+ PROF2060
     1AL5*ALOG(RHO/RHOS))/(AAA*AAA)                                     PROF2070
      H=(ALOG(RHO/RHOS)+(AL1+AL2*T+AL3*T*T)*(1./RHO-1./RHOS))/AAA+T*S   PROF2080
      H=HSAT+(P/RHO-PSAT/RHOS+H)*24.215                                 PROF2090
      S=SSAT+S*24.215                                                   PROF2100
      U=H-(P/RHO)*24.215                                                PROF2110
  440 IF (IND.EQ.0) GO TO 450                                           PROF2120
      CP0=A0+T*(B+T*(C+T*(D+T*(E+T*F))))                                PROF2130
      CV0=CP0-A(1)*24.215                                               PROF2140
      CV=(CV0+CVINT(P,T,RHO)*24.215)/32.00                              PROF2150
      DPDT=DFDT(P,T,RHO)                                                PROF2160
      DPDR=DFDR(P,T,RHO)                                                PROF2170
      CPP=CV+T*DPDT*DPDT/(RHO*RHO*DPDR)*24.215/32.00                    PROF2180
      GAMMA=CPP/CV                                                      PROF2190
      C0=SQRT(GAMMA*DPDR*1.013E5/32.00)*3.281                           PROF2200
      DPDR=DPDR/32.00*24.215*1.8                                        PROF2210
  450 T=T*1.8                                                           PROF2220
      P=14.696*P                                                        PROF2230
      RHO=RHO*62.428227*32.00/(1728.*1000.)                             PROF2240
      H=H*1.798823/32.000                                               PROF2250
      S=S*1.798823/(32.000*1.8)                                         PROF2260
      U=U*1.798823/32.00                                                PROF2270
      RETURN                                                            PROF2280
      END                                                               PROF2290
      SUBROUTINE PRPHOH (TEMP,PRESS,RHO,H,S,U)                          PRPH   0
C   I/O UNITS= T(DEG R) P(PSIA),RHO(LBM/CU IN),H+U(BTU/LBM),S(BTU/LBM DEPRPH  10
C   INTERNAL UNITS=T(DEG K),P(ATM),RHO(GR-MOLE/LITER),H+U(CAL/GR-MOLE), PRPH  20
C   S(CAL/GR-MOLE DEG K)                                                PRPH  30
      COMMON/PROPS/GAMMA,CP,CV,C0,DPDR                                  PRPH  40
      DIMENSION A(4,18),B(72)                                           PRPH  50
      EQUIVALENCE (A,B)                                                 PRPH  60
C   THERMODYNAMIC PROPERTIES OF WATER VAPOR                             PRPH  70
C                                                                       PRPH  80
C   CONSTANTS FOR WATER                                                 PRPH  90
      DATA (B(I),I=1,72,4)/18.016,15.39,8.53E3,3209.,1165.,5.0,.0706, .0PRPH 100
     160,.1042,1.0E7,8.04974475,-1.50957077E-3,5.89708921E-6, -3.1097462PRPH 110
     23E-9,5.33133423E-13,0.,786.1,100./                                PRPH 120
      IGAS=1                                                            PRPH 130
      NAME=10H H2O                                                      PRPH 140
      GO TO 100                                                         PRPH 150
      ENTRY PRPH2                                                       PRPH 160
C   THERMODYNAMIC PROPERTIES OF HYDROGEN ABOVE 540 DEG R                PRPH 170
C                                                                       PRPH 180
C   CONSTANTS FOR H2                                                    PRPH 190
      DATA (B(I),I=2,72,4)/2.016,9.7389,2.6810E2,190.75,59.72,.1975, -.0PRPH 200
     10506,.02096,-.04359,.0504E+4,4.81154,9.88900E-3,-1.49773E-5, 9.513PRPH 210
     216E-9,-2.04376E-12,17.455,2801.5,540./                            PRPH 220
      IGAS=2                                                            PRPH 230
      NAME=10H H2                                                       PRPH 240
      GO TO 100                                                         PRPH 250
      ENTRY PRPO2                                                       PRPH 260
C   THERMODYNAMIC PROPERTIES OF OXYGEN ABOVE 540 DEG R                  PRPH 270
C                                                                       PRPH 280
C   CONSTANTS FOR O2                                                    PRPH 290
      DATA (B(I),I=3,72,4)/32.00,12.06750,1.52254E3,736.9,278.59, 1.4911PRPH 300
     1,.02562,.04624,.004208,4.80E+4,6.91726,-5.58781E-4, 4.83537E-6,-3.PRPH 310
     270490E-9,8.48173E-13,1.665,5067.5,540./                           PRPH 320
      IGAS=3                                                            PRPH 330
      NAME=10H O2                                                       PRPH 340
      GO TO 100                                                         PRPH 350
      ENTRY PROPHE                                                      PRPH 360
C   THERMODYNAMIC PROPERTIES FOR HELIUM                                 PRPH 370
C                                                                       PRPH 380
C   CONSTANTS FOR HE                                                    PRPH 390
      DATA (B(I),I=4,72,4)/4.003,6.96448,3.233E1,33.34,9.349,.0216, .059PRPH 400
     184,.01400,0.0,.0040E+4,4.9681,0.,0.,0.,0.,0.,496.8,100./          PRPH 410
      IGAS=4                                                            PRPH 420
      NAME=10H HELIUM                                                   PRPH 430
      GO TO 100                                                         PRPH 440
C                                                                       PRPH 450
C   COMMON SOLUTION ROUTINES                                            PRPH 460
C  ENTER CONSTANTS                                                      PRPH 470
  100 WM=A(IGAS,1)                                                      PRPH 480
      SAT1=A(IGAS,2)                                                    PRPH 490
      SAT2=A(IGAS,3)                                                    PRPH 500
      PCRIT=A(IGAS,4)                                                   PRPH 510
      TCRIT=A(IGAS,5)                                                   PRPH 520
      ANOT=A(IGAS,6)                                                    PRPH 530
      ABB=A(IGAS,7)                                                     PRPH 540
      BNOT=A(IGAS,8)                                                    PRPH 550
      BBB=A(IGAS,9)                                                     PRPH 560
      CBB=A(IGAS,10)                                                    PRPH 570
      A1=A(IGAS,11)                                                     PRPH 580
      A2=A(IGAS,12)                                                     PRPH 590
      A3=A(IGAS,13)                                                     PRPH 600
      A4=A(IGAS,14)                                                     PRPH 610
      A5=A(IGAS,15)                                                     PRPH 620
      SNOT=A(IGAS,16)                                                   PRPH 630
      HNOT=A(IGAS,17)                                                   PRPH 640
      T0=A(IGAS,18)                                                     PRPH 650
      RHO=RHO*1728.                                                     PRPH 660
      P=PRESS/14.696                                                    PRPH 670
      T=TEMP/1.8                                                        PRPH 680
C   SELECT SOLUTION ROUTINE                                             PRPH 690
      IF (ABS(RHO).LT.1.0E-5) GO TO 140                                 PRPH 700
      V=WM*.06242/RHO                                                   PRPH 710
      IF (ABS(T).LT.1.0E-5) GO TO 110                                   PRPH 720
C   SOLUTION FOR PRESS                                                  PRPH 730
      EPS=CBB/(V*T*T*T)                                                 PRPH 740
      ACAP=ANOT*(1.-ABB/V)                                              PRPH 750
      BCAP=BNOT*(1.-BBB/V)                                              PRPH 760
      P=((.08206*T)*(1.-EPS)*(V+BCAP)-ACAP)/(V*V)                       PRPH 770
      PRESS=P*14.696                                                    PRPH 780
      V2=V                                                              PRPH 790
      GO TO 210                                                         PRPH 800
C   SOLUTION FOR TEMPERATURE                                            PRPH 810
  110 K=0                                                               PRPH 820
      R=.08206                                                          PRPH 830
      T=P*V/R                                                           PRPH 840
      ALPHA=R/V+R*BNOT/(V*V)                                            PRPH 850
      BETA=P+ANOT/(V*V)-ANOT*ABB/(V*V*V)                                PRPH 860
      GAMMA=R*CBB/(V*V)*(1.+BNOT/V)                                     PRPH 870
  120 TO=(ABS((BETA*T*T+GAMMA)/ALPHA))**.3333                           PRPH 880
      IF (ABS((T-TO)/T).LT.1.0E-5) GO TO 130                            PRPH 890
      K=K+1                                                             PRPH 900
      IF (K.GT.50) GO TO 220                                            PRPH 910
      T=TO                                                              PRPH 920
      GO TO 120                                                         PRPH 930
  130 T=TO                                                              PRPH 940
      TEMP=T*1.8                                                        PRPH 950
      V2=V                                                              PRPH 960
      GO TO 210                                                         PRPH 970
C                                                                       PRPH 980
C ARRHENIUS PLOT OF SATURATION LINE                                     PRPH 990
C                                                                       PRPH1000
  140 IF(TEMP .GT. TCRIT) GO TO 170                                     PRPH1010
      IF (PRESS .GT. PCRIT) GO TO 150                                   PRPH1020
      PSAT=EXP(SAT1-(SAT2/TEMP))                                        PRPH1030
      IF (PSAT .GT. PRESS) GO TO 170                                    PRPH1040
  150 WRITE(6,160) TEMP,PRESS,NAME                                      PRPH1050
  160 FORMAT(1H0,9(1H*),*  PROPERTIES ARE IN LIQUID REGION AT TEMP =*,  PRPH1060
     1 G12.5,* PRESS =*,G12.5,* FOR *,A10,9(1H*))                       PRPH1070
      RETURN                                                            PRPH1080
C                                                                       PRPH1090
C OBTAIN RHO FROM BEATTIE-BRIDGEMAN EQUATION OF STATE                   PRPH1100
C                                                                       PRPH1110
  170 JPRINT = 1                                                        PRPH1120
      PI=.08206*T/P                                                     PRPH1130
      EPS = CBB/(PI*T*T*T)                                              PRPH1140
      AA = ANOT*(1.-ABB/PI)                                             PRPH1150
      BB = BNOT*(1.-BBB/PI)                                             PRPH1160
      ASSIGN 190 TO N                                                   PRPH1170
      V1 =(PI+BB)*(1.-EPS)-AA/(.08206*T)                                PRPH1180
      M=0                                                               PRPH1190
  180 AA = ANOT*(1.-ABB/V1)                                             PRPH1200
      BB = BNOT*(1.-BBB/V1)                                             PRPH1210
      EPS = CBB/(V1*T*T*T)                                              PRPH1220
      P1=.08206*T*(1.-EPS)*(V1+BB)/(V1*V1)-AA/(V1*V1)                   PRPH1230
      GO TO N,(190,200)                                                 PRPH1240
  190 ASSIGN 200 TO N                                                   PRPH1250
      V2 = V1                                                           PRPH1260
      P2 = P1                                                           PRPH1270
      V1=P1*V1/P                                                        PRPH1280
      GO TO 180                                                         PRPH1290
  200 TAN=(P1-P2)/(1./V1 -1./V2)                                        PRPH1300
      RHO=1./V1 +(P-P1)/TAN                                             PRPH1310
      V2 = V1                                                           PRPH1320
      V1 = 1./RHO                                                       PRPH1330
      P2 = P1                                                           PRPH1340
      M=M+1                                                             PRPH1350
      IF (M.GT.50) GO TO 220                                            PRPH1360
      IF (ABS(P1-P)/P .GT. 1.0E-5) GO TO 180                            PRPH1370
  210 RHO=1./V2                                                         PRPH1380
C                                                                       PRPH1390
C OBTAIN ENTHALPY                                                       PRPH1400
      ENOT = HNOT* 1.8/WM -(357.7068/WM)                                PRPH1410
      H=(43.587/WM)*((-.08206*CBB*RHO/(T*T))*(3.+RHO*BNOT*(1.5-RHO*BBB))PRPH1420
     1 +ANOT*RHO*(-1.+.5*ABB*RHO)) +43.587*P*V2/WM +(1.8/WM)*(T*(A1-1.98PRPH1430
     2726+T*(A2/2.+T*(A3/3.+T*(A4/4.+T*(A5/5.)))))) -(1.8/WM)*(T0*(A1-1.PRPH1440
     398726+T0*(A2/2.+T0*(A3/3.+T0*(A4/4.+T0*A5/5.)))))+ENOT            PRPH1450
C                                                                       PRPH1460
C OBTAIN ENTROPY                                                        PRPH1470
C                                                                       PRPH1480
C                                                                       PRPH1490
      T3=T*T*T                                                          PRPH1500
      S=(43.587/WM)*((-.08206*CBB*RHO/(T3 ))*(-2.-BNOT*RHO*(1.-2.*BBB/(3PRPH1510
     1.*V2)))+.08206*BNOT *RHO*(-1.+BBB*RHO/2.))-43.587/WM*.08206* ALOG(PRPH1520
     2.08206*T/V2) +1.8/WM*(A1*ALOG(T/T0)+T*(A2+T*(A3/2.+T*(A4/3.+T*A5/4PRPH1530
     3.)))- T0*(A2+T0*(A3/2.+T0*(A4/3.+T0*A5/4.))))                     PRPH1540
      S=S/1.8+SNOT                                                      PRPH1550
C                                                                       PRPH1560
C CONSTANT VOLUME SPECIFIC HEAT                                         PRPH1570
C                                                                       PRPH1580
      CVTNOT = (1./WM)*(A1-1.98726+T*(A2+T*(A3+T*(A4+T*A5))))           PRPH1590
      CV=CVTNOT+11.922*CBB/(WM*T*T*T*V2)*(1.+BNOT*(1.-BBB*.666/V2)/(2.* PRPH1600
     1V2))                                                              PRPH1610
C                                                                       PRPH1620
C CONSTANT PRESSURE SPECIFIC HEAT                                       PRPH1630
C                                                                       PRPH1640
      PCP=1.+2.*CBB/(V2*T*T*T)*(1.+BNOT/V2*(1.-BBB/V2))+BNOT/V2*(1.-BBB/PRPH1650
     1 V2)                                                              PRPH1660
      PCP=(-1.98701/WM)*PCP*PCP/(-1.+RHO*(CBB/(T*T*T)*(2.+BNOT*RHO*(3.- PRPH1670
     14.*BBB*RHO))+ANOT/(.08206*T)*(2.-3.*ABB*RHO)+BNOT*(-2.+3.*BBB*RHO PRPH1680
     2)))                                                               PRPH1690
      CP = CV + PCP                                                     PRPH1700
      GAMMA=CP/CV                                                       PRPH1710
      DPDR=.08206*T*((-RHO*CBB/(T*T*T))*(2.+3.*BNOT*RHO-4.*BNOT*RHO*RHO PRPH1720
     1*BBB)+1.+2.*BNOT*RHO-3.*BNOT*RHO*RHO*BBB)+ANOT*RHO*(3.*RHO*ABB-2.)PRPH1730
      C0=SQRT(GAMMA*DPDR*1.013E5/WM)*3.281                              PRPH1740
      DPDR=DPDR/WM*24.215*1.8                                           PRPH1750
      RHO=RHO*WM*.06242                                                 PRPH1760
      U=H-PRESS/RHO*144./777.5                                          PRPH1770
      RHO=RHO/1728.                                                     PRPH1780
      RETURN                                                            PRPH1790
  220 WRITE (6,230) NAME,PRESS,TEMP,RHO                                 PRPH1800
      RETURN                                                            PRPH1810
  230 FORMAT (1H0,6(1H*),A10,39HPROPERTY SUBROUTINE DID NOT CONVERGE,P=,PRPH1820
     1F10.4,3H T=,F10.4,5H RHO=,F10.4,6(1H*)/)                          PRPH1830
      END                                                               PRPH1840
      FUNCTION CVINT (P,T,RHO)                                          CVIN   0
C   VERSION 24 JULY 70                                                  CVIN  10
      COMMON/BLK1/A(17)                                                 CVIN  20
      REAL INT                                                          CVIN  30
      T2=1./(T*T)                                                       CVIN  40
      T3=T2/T                                                           CVIN  50
      T4=T3/T                                                           CVIN  60
      T5=T4/T                                                           CVIN  70
      EX=EXP(-A(17)*RHO*RHO)/(2.*A(17))                                 CVIN  80
      INT=-(2.*A(4)*T2+6.*A(5)*T3+20.*A(6)*T5)*RHO +(6.*A(10)*T3+12.*A(1CVIN  90
     11)*T4+20.*A(12)*T5)*(EX-.5/A(17)) +(6.*A(13)*T3+12.*A(14)*T4+20.*ACVIN 100
     2(15)*T5)*(EX*(RHO*RHO+1./A(17))-.5/(A(17)*A(17)))                 CVIN 110
      CVINT=INT                                                         CVIN 120
      RETURN                                                            CVIN 130
      END                                                               CVIN 140
      SUBROUTINE HSAT(P,T)                                              HSAT   0
      T=20.9703+0.06039*P+5.46077*ALOG(P)                               HSAT  10
      RETURN                                                            HSAT  20
      END                                                               HSAT  30
      SUBROUTINE OSAT(P,T)                                              OSAT   0
      T=126.386+0.213752*P+12.4675*ALOG(P)                              OSAT  10
      RETURN                                                            OSAT  20
      END                                                               OSAT  30
 7                    -   --   8-8   1- J  8 1--
 $LINE LMAX=158,55, LFN=124,12.5,12.5,1.5,7.5,35,4,8,8,0,10,6,6,3,1,8,3,3,1,1,
 0,2,1,2,6,0.5,3,6,15,0    $END
 $VALVE FN=10,9,8,7,6,5,4,3,2,1,2,0,0,0,0,0,2,3,6,13    $END
 $LOWPC F=1000,XNET=33,XNEF=10,TOTI=3000000,TGASH2=150,TGASO2=200,XMR=3,EPS=8,
 TTMAX=200,PTH=20,PAPSH=40,PTO=20,PAPSO=35,DELPM=14,PAINJ=2,NPRTPC=1,PLOAD=17,
 TUBDH=.298,TUBDO=.394,TUBSPH=10,TUBSPO=4,TUBLGH=15,TUBLGO=17.5,XNTUBH=62,
 XNTUBO=154,XNOPH=4,XNOPO=2,WPRCNH=.5,WPRCNO=.73,TIPRCN=1,RITO=1,WRH2=0,
 WRO2=2200,IEND=0    $END

 "                   1 2 5 8 / -112-418- 18- 18   8   8  1 2 5 8 / -112 418  18
182 488  8-1 014 81   1   1 2 588 /8-110 4 8   8   8   8                      "1
ENDSTORE                                                                       1
STORE    MSC-14017                                                             1
SC-14017                                                                       1
ROPULSION COMPUTER PROGRAM                                                     1
     PROGRAM LOPCOP(INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT)             LOPC10001
     COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  LOPC10101
     COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SULOPC10201
    1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOLOPC10301
    2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WLOPC10401
    3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RLOPC10501
    4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       LOPC10601
     COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDLOPC10701
    1IN                                                                LOPC10801
     COMMON/LIST4/DLINE(2,2,3),XLINE(2,2,3),PINJ,FLOW,ICM(100)         LOPC10901
     COMMON/LIST5/WO2D,WH2D,PC,TH2IN,TO2IN,PH2IN,PO2IN,CD,TH2,TO2,PH2, LOPC11001
    1PO2,WH2,WO2,OF,WTOTAL,THRUST,SI,CSTAR,J,PCD,EPS,THRUSN,NENG(100)  LOPC11101
     COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), LOPC11201
    1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RALOPC11301
    2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXLOPC11401
    3(2),DW(2),ICONT2,RPTS(2),IREG                                     LOPC11501
     COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVLOPC11601
    1,CVBARL,UBARV,UBARL,VLV                                           LOPC11701
     COMMON/LIST8/ELPANL(2),THIPAN(2),DFLOW(2),PLOAD(2),TLOA D(2),HLOADLOPC11801
    1(2),VISL(2),CONDL(2),CPL(2),TSATL(2), HSATL(2),HSATV(2),VISV(2),COLOPC11901
    2NDV(2),CPV(2),TF(20), NTUBE(2),PGAS,TGAS,TTWALL,TUBESP(2),TDIFF,TALOPC12001
    3U(100),PHEX(2) ,ITERPP,TFHX(2),IHEAT,CONSTK,SUMVAP,WVAPO1,JK,DELPXLOPC12101
    4(2)                                                               LOPC12201
     COMMON/LIST9/TIMFLV,PVAPNW,PVAPSV,TVAPNW,TVAPSV,ITESTR, EMTOT,EMTOLOPC12301
    1TN,EMVENT,ISW,VTANK,DTANK,QDTLO2,HVAPOR,TOTVAP,IC1,I1P,ZKK,QDTVO2 LOPC12401
    2,PDIFF                                                            LOPC12501
     COMMON/LIST10/WENG(2),TV(2)                                       LOPC12601
     COMMON/LIST12/WDOTL(2,100),SWDOTL(2),ICONTR,DSD(2),D1,WD5(2) ,NSWILOPC12701
    1TC(2)                                                             LOPC12801
     DIMENSION PINJIN(2),QR(2),PVV(2),WD6(2),TT3(2),TOTIM(100), TIMP(10LOPC12901
    10),PIONE(2),TIONE(2),TTIONE(2),HENG(2),HLIQ(2), WDPI(2,100),TWIONELOPC13001
    2(2)                                                               LOPC13101
     NAMELIST/FDATA/WM,PR,PU,VOL,WT,C2,AS,WTVEH,DIAT,XXT,T0, Q0,THKIN,CLOPC13201
    1ONDIN,WO2D,WH2D,PCD,CD,RATRE,IDATA,DELN,WDMIN ,PREGH2,PREGO2,SIN,PLOPC13301
     3INS,HLIQ,HENG,ITANK,IPASHX,ICONT2,FRACIM,IPRSUP,RPTS,CONSTK, DTANKLOPC1350
     4,VTANK,QDTLO2,ICONTR,PDIFF,THRUSN,IREG,AIRIS                      LOPC1360
      NAMELIST/VDATA/HP,PI,TI,TTI,WLR,EMTOT,PVAPSV,TVAPSV               LOPC1370
      NAMELIST/HXDATA/ELPANL,THIPAN,DFLOW,PLOAD,TLOAD,HLOAD,NTUBE ,TDIFFLOPC1380
     1,TUBESP                                                           LOPC1390
  100 READ(5,FDATA)                                                     LOPC1400
      WRITE(6,FDATA)                                                    LOPC1410
      DO 110 ICMT=1,3                                                   LOPC1420
      DO 110 IPROP=1,2                                                  LOPC1430
      READ(5,750) DLINE(1,IPROP,ICMT),DLINE(2,IPROP,ICMT)               LOPC1440
  110 READ(5,750) XLINE(1,IPROP,ICMT),XLINE(2,IPROP,ICMT)               LOPC1450
      IF(IPASHX.NE.1) GO TO 120                                         LOPC1460
      READ(5,HXDATA)                                                    LOPC1470
      WRITE(6,HXDATA)                                                   LOPC1480
  120 READ(5,750) (TIMP(N),N=1,IDATA)                                   LOPC1490
      READ(5,750) (TAU(N),N=1,IDATA)                                    LOPC1500
      READ(5,740) (NENG(N),N=1,IDATA)                                   LOPC1510
      READ(5,740) (ICM(N),N=1,IDATA)                                    LOPC1520
      TIM=0.                                                            LOPC1530
      OFN=WO2D/WH2D                                                     LOPC1540
      DO 130 N=1,IDATA                                                  LOPC1550
      WDOT(1,N)=TIMP(N)/(SIN*TAU(N)*(1.+OFN))                           LOPC1560
      WDOT(2,N)=WDOT(1,N)*OFN                                           LOPC1570
  130 TIM=TIM+TIMP(N)                                                   LOPC1580
      READ(5,VDATA)                                                     LOPC1590
      WRITE(6,VDATA)                                                    LOPC1600
      WRITE(6,1010) TIM                                                 LOPC1610
      TOTI=0.                                                           LOPC1620
      TIME=0.                                                           LOPC1630
      DSD(1)=DSD(2)=0.                                                  LOPC1640
      IHEAT=0                                                           LOPC1650
      NIMPR=0                                                           LOPC1660
      EMTOTN=EMTOT                                                      LOPC1670
      PVAPNW=PVAPSV                                                     LOPC1680
      TVAPNW=TVAPSV                                                     LOPC1690
      JSWITC(1)=JSWITC(2)=KSWITC(1)=KSWITC(2)=LSWITC(1)=LSWITC(2)=0     LOPC1700
      NSWITC(1)=NSWITC(2)=0                                             LOPC1710
      TINS1=T3                                                          LOPC1720
      J=1                                                               LOPC1730
      N=1                                                               LOPC1740
      JK=1                                                              LOPC1750
      PC=PCD                                                            LOPC1760
      SUMR(1)=SUMR(2)=SUMV(1)=SUMV(2)=0.                                LOPC1770
      SWDOTL(1)=SWDOTL(2)=0.                                            LOPC1780
      I1P=0                                                             LOPC1790
      WRITE(6,760)N                                                     LOPC1800
      WRITE(6,790)                                                      LOPC1810
      FRACTI=FRACIM/((WH2D+WO2D)*SIN*NENG(N))                           LOPC1820
  140 TAU1=TAU(N)                                                       LOPC1830
      ICONT1=ICONT2                                                     LOPC1840
      DELN1=DELN                                                        LOPC1850
      WDOTAS=WDOT(1,N)                                                  LOPC1860
      TOTIM(N)=TIMP(N)                                                  LOPC1870
      IF(WDOT(1,N).GT.WDMIN.OR.WDOT(1,N).LE.1.E-8) ICONT1=0             LOPC1880
      IF(WDOT(1,N).GT.WDMIN.OR.WDOT(1,N).LE.1.E-8) GO TO 180            LOPC1890
      IF(ICONT2.LT.2) GO TO 180                                         LOPC1900
      ICONT1=2                                                          LOPC1910
      TOTNIM=TOTIM(N)/FRACIM                                            LOPC1920
      NIMS=IFIX(TOTNIM)                                                 LOPC1930
      XFRIMR=TOTNIM-FLOAT(NIMS)                                         LOPC1940
      IPOI=0                                                            LOPC1950
      IF(XFRIMR.LT..15) IPOI=1                                          LOPC1960
      NIMSU=NIMS+1                                                      LOPC1970
      NIMPID=2*NIMSU                                                    LOPC1980
      XNID=FLOAT(NIMSU)                                                 LOPC1990
      TIMEID=TAU(N)/XNID-FRACTI                                         LOPC2000
      XFRIMP=XFRIMR*FRACIM                                              LOPC2010
      XTIMRE=XFRIMR*FRACTI                                              LOPC2020
      TIMLID=TIMEID+FRACTI-XTIMRE                                       LOPC2030
      NIMPR=1                                                           LOPC2040
  150 IF(MOD(NIMPR,2).EQ.0) GO TO 170                                   LOPC2050
      DELN1=2.                                                          LOPC2060
      WDOTAS=WH2D*NENG(N)                                               LOPC2070
      IF(NIMPR.EQ.NIMPID-1) GO TO 160                                   LOPC2080
      TOTIM(N)=FRACIM                                                   LOPC2090
      TAU1=FRACTI                                                       LOPC2100
      GO TO 180                                                         LOPC2110
  160 TOTIM(N)=XFRIMP                                                   LOPC2120
      TAU1=XTIMRE                                                       LOPC2130
      IF(IPOI.EQ.0) GO TO 180                                           LOPC2140
      WDOT(1,N)=WDOT(2,N)=WDOTAS=TOTIM(N)=0.                            LOPC2150
      GO TO 180                                                         LOPC2160
  170 DELN1=10.                                                         LOPC2170
      TAU1=TIMEID                                                       LOPC2180
      IF(NIMPR.EQ.NIMPID) TAU1=TIMLID                                   LOPC2190
      WDOT(1,N)=WDOT(2,N)=WDOTAS=TOTIM(N)=0.                            LOPC2200
  180 IF(ICONT1.EQ.0.AND.WDOTAS.LE.1.E-8) DELN1=2.*DELN1                LOPC2210
      D=TAU1/DELN1                                                      LOPC2220
      D1=TAU1                                                           LOPC2230
      DW(1)=WDOTAS                                                      LOPC2240
      D0=D                                                              LOPC2250
  190 IF(JK.NE.2) EMTOT=EMTOTN                                          LOPC2260
      IF(JK.NE.2) PVAPSV=PVAPNW                                         LOPC2270
      IF(JK.NE.2) TVAPSV=TVAPNW                                         LOPC2280
      IF(DW(1) .LE. WDMIN) GO TO 560                                    LOPC2290
      K=1                                                               LOPC2300
      ITER=1                                                            LOPC2310
  200 DO 260 IPROP=1,2                                                  LOPC2320
      IF(IPROP.EQ.1) WENG(1)=WH2D*NENG(N)                               LOPC2330
      IF(IPROP.EQ.2) WENG(2)=WO2D*NENG(N)                               LOPC2340
      IF(K .GT. 1) WENG(IPROP)=DW(IPROP)                                LOPC2350
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 210                         LOPC2360
      IF(K .EQ. 1) GO TO 210                                            LOPC2370
      IF(K .GT. 1) H2=ENTH(IPROP)                                       LOPC2380
      IF(H2 .LE. HENG(IPROP)) WDOTL(IPROP,N)=0.                         LOPC2390
      IF(H2 .LE. HENG(IPROP)) GO TO 230                                 LOPC2400
      IF(K .GT. 1) GO TO 220                                            LOPC2410
  210 TEMP=TI(IPROP)                                                    LOPC2420
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) WDOT(IPROP,N)=WENG(IPROP)         LOPC2430
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 230                         LOPC2440
      CALL PROP                                                         LOPC2450
      IF(H2 .LE. HENG(IPROP)) WDOTL(IPROP,N)=0.                         LOPC2460
      IF(H2 .LE. HENG(IPROP)) WDOT(IPROP,N)=WENG(IPROP)                 LOPC2470
      IF(H2 .LE. HENG(IPROP)) GO TO 230                                 LOPC2480
  220 WDOT(IPROP,N)=WENG(IPROP)*(HENG(IPROP)-HLIQ(IPROP))/(H2-HLIQ(IPROPLOPC2490
     1))                                                                LOPC2500
      WDOTL(IPROP,N)=WENG(IPROP)*(1.-(HENG(IPROP)-HLIQ(IPROP))/(H2- HLIQLOPC2510
     1(IPROP)))                                                         LOPC2520
  230 CALL SETVAR                                                       LOPC2530
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) WDOTL(IPROP,N) =0.                LOPC2540
      CALL LPC2                                                         LOPC2550
      PVV(IPROP)=P                                                      LOPC2560
      PV(IPROP)=P                                                       LOPC2570
      TEMPV(IPROP)=T                                                    LOPC2580
      TV(IPROP)=T                                                       LOPC2590
      WD5(IPROP)=W5                                                     LOPC2600
      IF(NSWITC(IPROP).EQ.1) WD5(IPROP)=0.                              LOPC2610
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 240                         LOPC2620
      IF(IPROP.EQ.1) TV(1)=.2675*HENG(IPROP)+57.                        LOPC2630
      IF(IPROP .EQ. 2) TV(2)=4.46*HENG(IPROP)+13.                       LOPC2640
      IF(H2 .LE. HENG(IPROP)) TV(IPROP)=TEMPV(IPROP)                    LOPC2650
  240 IF(IPROP.EQ.2) GO TO 250                                          LOPC2660
      H21=H2                                                            LOPC2670
      C11=C1                                                            LOPC2680
      W11=W                                                             LOPC2690
      VIS11=VIS                                                         LOPC2700
      GO TO 260                                                         LOPC2710
  250 H22=H2                                                            LOPC2720
      C12=C1                                                            LOPC2730
      W22=W                                                             LOPC2740
      VIS22=VIS                                                         LOPC2750
  260 CONTINUE                                                          LOPC2760
      DO 310 IPROP=1,2                                                  LOPC2770
      IF(IPROP.EQ.2) GO TO 270                                          LOPC2780
      H2=H21                                                            LOPC2790
      C1=C11                                                            LOPC2800
      W=W11                                                             LOPC2810
      VIS=VIS11                                                         LOPC2820
      GO TO 280                                                         LOPC2830
  270 H2=H22                                                            LOPC2840
      C1=C12                                                            LOPC2850
      W=W22                                                             LOPC2860
      VIS=VIS22                                                         LOPC2870
  280 IF(IPROP.EQ.1) PRP(IPROP)=PREGH2                                  LOPC2880
      IF(IPROP.EQ.2) PRP(IPROP)=PREGO2                                  LOPC2890
      CALL RGIRIS                                                       LOPC2900
      FLOW=WENG(IPROP)                                                  LOPC2910
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TEMP=TEMPV(IPROP)                 LOPC2920
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) PRESS=PV(IPROP)                   LOPC2930
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 300                         LOPC2940
      TEMP=TV(IPROP)                                                    LOPC2950
      IF(IPROP.EQ.2) GO TO 290                                          LOPC2960
      PRESS=PREGH2                                                      LOPC2970
      IF(PV(1).LT.PREGH2) PRESS=PV(1)                                   LOPC2980
      GO TO 300                                                         LOPC2990
  290 PRESS=PREGO2                                                      LOPC3000
      IF(PV(2) .LT. PREGO2) PRESS=PV(2)                                 LOPC3010
  300 CALL PBAL                                                         LOPC3020
  310 PINJIN(IPROP)=PINJ                                                LOPC3030
      TH2=TV(1)                                                         LOPC3040
      TO2=TV(2)                                                         LOPC3050
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TH2=TEMPV(1)                      LOPC3060
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TO2=TEMPV(2)                      LOPC3070
      PH2=PINJIN(1)                                                     LOPC3080
      PO2=PINJIN(2)                                                     LOPC3090
      CALL MIXRAT                                                       LOPC3100
      DW(1)=WH2*NENG(N)                                                 LOPC3110
      DW(2)=WO2*NENG(N)                                                 LOPC3120
      IF(ICONT2.EQ.3) GO TO 320                                         LOPC3130
      IF(IPROP.EQ.1.AND.ICONT1.EQ.2) DW(1)=(DW(1)+WENG(1))*.5           LOPC3140
      IF(IPROP.EQ.2.AND.ICONT1.EQ.2) DW(2)=(DW(2)+WENG(2))*.5           LOPC3150
      IF(ICONT1.EQ.2) GO TO 340                                         LOPC3160
  320 DO 330 IPROP=1,2                                                  LOPC3170
      IF(ENTH(IPROP) .LE. HENG(IPROP)) WDOT(IPROP,N)=(WDOT(IPROP,N)+DW( LOPC3180
     1IPROP))*.5                                                        LOPC3190
  330 CONTINUE                                                          LOPC3200
  340 K=K+1                                                             LOPC3210
      IDIFFW=0                                                          LOPC3220
      IF(K.LT.10.AND.ICONT1.EQ.0) GO TO 200                             LOPC3230
      IF(ICONT1.NE.0.AND.(ABS(WENG(2)-DW(2))).GT..01) IDIFFW=1          LOPC3240
      IF(IDIFFW.EQ.1.AND.K.LT.20) GO TO 200                             LOPC3250
      ITER=2                                                            LOPC3260
      DO 430 IPROP=1,2                                                  LOPC3270
      WENG(IPROP)=DW(IPROP)                                             LOPC3280
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) WDOT(IPROP,N)=WENG(IPROP)         LOPC3290
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 350                         LOPC3300
      H2=ENTH(IPROP)                                                    LOPC3310
      IF(H2 .LE. HENG(IPROP)) WDOTL(IPROP,N)=0.                         LOPC3320
      IF(H2 .LE. HENG(IPROP)) GO TO 350                                 LOPC3330
      WDOT(IPROP,N)=WENG(IPROP)*(HENG(IPROP)-HLIQ(IPROP))/(H2-HLIQ(IPROPLOPC3340
     1))                                                                LOPC3350
      WDOTL(IPROP,N)=WENG(IPROP)*(1.-(HENG(IPROP)-HLIQ(IPROP))/(H2- HLIQLOPC3360
     1(IPROP)))                                                         LOPC3370
  350 CALL SETVAR                                                       LOPC3380
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) WDOTL(IPROP,N)=0.                 LOPC3390
      CALL LPC2                                                         LOPC3400
      PVV(IPROP)=P                                                      LOPC3410
      WD5(IPROP)=W5                                                     LOPC3420
      IF(IPROP.EQ.2) GO TO 360                                          LOPC3430
      H21=H2                                                            LOPC3440
      C11=C1                                                            LOPC3450
      W11=W                                                             LOPC3460
      VIS11=VIS                                                         LOPC3470
      GO TO 370                                                         LOPC3480
  360 H22=H2                                                            LOPC3490
      C12=C1                                                            LOPC3500
      W22=W                                                             LOPC3510
      VIS22=VIS                                                         LOPC3520
  370 PV(IPROP)=P                                                       LOPC3530
      TEMPV(IPROP)=T                                                    LOPC3540
      TV(IPROP)=T                                                       LOPC3550
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 380                         LOPC3560
      IF(IPROP.EQ.1) TV(1)=.2675*HENG(IPROP)+57.                        LOPC3570
      IF(IPROP .EQ. 2) TV(2)=4.46*HENG(IPROP)+13.                       LOPC3580
      IF(H2 .LE. HENG(IPROP)) TV(IPROP)=TEMPV(IPROP)                    LOPC3590
  380 QR(IPROP)=Q                                                       LOPC3600
      WD6(IPROP)=W6                                                     LOPC3610
      TT3(IPROP)=T3                                                     LOPC3620
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TV(IPROP)=TEMPV(IPROP)            LOPC3630
      IF(IPRSUP.NE.0) GO TO 390                                         LOPC3640
      IF(ICONT1.EQ.2.AND.JK.EQ.1) GO TO 430                             LOPC3650
  390 GO TO (400,410,420),IMODE                                         LOPC3660
  400 IF(IPROP .EQ. 1) WRITE(6,840) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC3670
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC3680
      IF(IPROP .EQ. 2) WRITE(6,860) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC3690
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC3700
      GO TO 430                                                         LOPC3710
  410 IF(IPROP .EQ. 1) WRITE(6,890) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC3720
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC3730
      IF(IPROP .EQ. 2) WRITE(6,900) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC3740
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC3750
      GO TO 430                                                         LOPC3760
  420 IF(IPROP .EQ. 1) WRITE(6,890) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC3770
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC3780
      IF(IPROP .EQ. 2) WRITE(6,900) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC3790
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC3800
  430 CONTINUE                                                          LOPC3810
      DO 480 IPROP=1,2                                                  LOPC3820
      IF(IPROP.EQ.2) GO TO 440                                          LOPC3830
      H2=H21                                                            LOPC3840
      C1=C11                                                            LOPC3850
      W=W11                                                             LOPC3860
      VIS=VIS11                                                         LOPC3870
      GO TO 450                                                         LOPC3880
  440 H2=H22                                                            LOPC3890
      C1=C12                                                            LOPC3900
      W=W22                                                             LOPC3910
      VIS=VIS22                                                         LOPC3920
  450 IF(IPROP.EQ.1) PRP(IPROP)=PREGH2                                  LOPC3930
      IF(IPROP.EQ.2) PRP(IPROP)=PREGO2                                  LOPC3940
      CALL RGIRIS                                                       LOPC3950
      FLOW=WENG(IPROP)                                                  LOPC3960
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TEMP=TEMPV(IPROP)                 LOPC3970
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) PRESS=PV(IPROP)                   LOPC3980
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 470                         LOPC3990
      TEMP=TV(IPROP)                                                    LOPC4000
      IF(IPROP.EQ.2) GO TO 460                                          LOPC4010
      PRESS=PREGH2                                                      LOPC4020
      IF(PV(1) .LT. PREGH2) PRESS=PV(1)                                 LOPC4030
      GO TO 470                                                         LOPC4040
  460 PRESS=PREGO2                                                      LOPC4050
      IF(PV(2) .LT. PREGO2) PRESS=PV(2)                                 LOPC4060
  470 CALL PBAL                                                         LOPC4070
  480 PINJIN(IPROP)=PINJ                                                LOPC4080
      TH2=TV(1)                                                         LOPC4090
      TO2=TV(2)                                                         LOPC4100
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TH2=TEMPV(1)                      LOPC4110
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) TO2=TEMPV(2)                      LOPC4120
      PH2=PINJIN(1)                                                     LOPC4130
      PO2=PINJIN(2)                                                     LOPC4140
      CALL MIXRAT                                                       LOPC4150
      WH2=WH2*NENG(N)                                                   LOPC4160
      WO2=WO2*NENG(N)                                                   LOPC4170
      IF(IPRSUP.NE.0) GO TO 490                                         LOPC4180
      IF(ICONT1.EQ.2.AND.JK.EQ.1) GO TO 510                             LOPC4190
  490 IF(IPASHX.EQ.0) GO TO 500                                         LOPC4200
      WRITE(6,950 )                                                     LOPC4210
      WRITE(6,960 ) CSTAR,SI,PC,THRUST,WH2,WO2,OF,PH2,PO2,TFHX(1),TFHX(2LOPC4220
     1),PHEX(1),PHEX(2),AIRIS(1),AIRIS(2),PRP(1),PRP(2)                 LOPC4230
      WRITE(6,990 ) WVAPO1,DELPX(1),SUMVAP,DELPX(2),PVAPNW,TVAPNW,EMTOTNLOPC4240
      GO TO 510                                                         LOPC4250
  500 WRITE(6,970 )                                                     LOPC4260
      WRITE(6,980 ) CSTAR,SI,PC,THRUST,WH2,WO2,OF,PH2,PO2,TFHX(1),TFHX(2LOPC4270
     1),AIRIS(1),AIRIS(2), PRP(1),PRP(2)                                LOPC4280
      WRITE(6,990 ) WVAPO1,DELPX(1),SUMVAP,DELPX(2),PVAPNW,TVAPNW,EMTOTNLOPC4290
  510 TOTI=TOTI+WTOTAL*NENG(N)*D*SI                                     LOPC4300
      IF(JK .EQ. 2) WRITE(6,770)                                        LOPC4310
      IF(JK .EQ. 2) WRITE(6,780) TOTI                                   LOPC4320
      IF(JK .EQ. 2) GO TO 670                                           LOPC4330
      IF(TOTI .GT. TOTIM(N)) GO TO 530                                  LOPC4340
      DTONE=D0                                                          LOPC4350
      TOIONE=TOTI                                                       LOPC4360
      DO 520 IPROP=1,2                                                  LOPC4370
      PIONE(IPROP)=PVV(IPROP)                                           LOPC4380
      TIONE(IPROP)=TEMPV(IPROP)                                         LOPC4390
  520 TTIONE(IPROP)=TT3(IPROP)                                          LOPC4400
      ICONT3=0                                                          LOPC4410
      GO TO 700                                                         LOPC4420
  530 TOITWO=TOTI                                                       LOPC4430
      DO 540 IPROP=1,2                                                  LOPC4440
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LOPC4450
      SUMR(IPROP)=SUMR(IPROP)-WD5(IPROP)*DSD(IPROP)                     LOPC4460
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LOPC4470
  540 WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LOPC4480
      TOTI=TOTI-WTOTAL*NENG(N)*D*SI                                     LOPC4490
      DTTWO=D0                                                          LOPC4500
      BCONST=(TOIONE-TOITWO)/(DTONE-DTTWO)                              LOPC4510
      ACONST=TOITWO-BCONST*DTTWO                                        LOPC4520
      DTREQ=(TOTIM(N)-ACONST)/BCONST                                    LOPC4530
      D=DTREQ-DTONE                                                     LOPC4540
      D0=DTONE+D                                                        LOPC4550
      WRITE(6,790)                                                      LOPC4560
      JK=2                                                              LOPC4570
      DO 550 IPROP=1,2                                                  LOPC4580
      PI(IPROP)=PIONE(IPROP)                                            LOPC4590
      TI(IPROP)=TIONE(IPROP)                                            LOPC4600
  550 TTI(IPROP)=TTIONE(IPROP)                                          LOPC4610
      GO TO 190                                                         LOPC4620
  560 ITER=2                                                            LOPC4630
      DO 650 IPROP=1,2                                                  LOPC4640
      WDPI(IPROP,N)=WDOT(IPROP,N)                                       LOPC4650
      WENG(IPROP)=WDPI(IPROP,N)                                         LOPC4660
      IF(ICONT2.NE.0.AND.ICONT2.NE.3) GO TO 570                         LOPC4670
      TEMP=TI(IPROP)                                                    LOPC4680
      CALL PROP                                                         LOPC4690
      IF(H2 .LE. HENG(IPROP)) WDOTL(IPROP,N)=0.                         LOPC4700
      IF(H2 .LE. HENG(IPROP)) GO TO 580                                 LOPC4710
      IF(WDOT(IPROP,N) .LE. 0.) WDOTL(IPROP,N)=0.                       LOPC4720
      IF(WDOT(IPROP,N) .LE. 0.) GO TO 580                               LOPC4730
      WDOT(IPROP,N)=WENG(IPROP)*(HENG(IPROP)-HLIQ(IPROP))/(H2-HLIQ(IPROPLOPC4740
     1))                                                                LOPC4750
      WDOTL(IPROP,N)=WENG(IPROP)*(1.-(HENG(IPROP)-HLIQ(IPROP))/(H2- HLIQLOPC4760
     1(IPROP)))                                                         LOPC4770
      GO TO 580                                                         LOPC4780
  570 WDOTL(IPROP,N)=0.                                                 LOPC4790
  580 CALL SETVAR                                                       LOPC4800
      CALL LPC2                                                         LOPC4810
      PVV(IPROP)=P                                                      LOPC4820
      PV(IPROP)=P                                                       LOPC4830
      TEMPV(IPROP)=T                                                    LOPC4840
      IF(IPROP .EQ. 1) TV(1)=.2675*HENG(IPROP)+57.                      LOPC4850
      IF(IPROP .EQ. 2) TV(2)=4.46*HENG(IPROP)+13.                       LOPC4860
      IF(H2 .LT. HENG(IPROP)) TV(IPROP)=TEMPV(IPROP)                    LOPC4870
      IF(ICONT2.NE.0.AND.ICONT2.NE.3) TV(IPROP)=TEMPV(IPROP)            LOPC4880
      QR(IPROP)=Q                                                       LOPC4890
      WD5(IPROP)=W5                                                     LOPC4900
      WD6(IPROP)=W6                                                     LOPC4910
      TT3(IPROP)=T3                                                     LOPC4920
      WDOT(IPROP,N)=WDPI(IPROP,N)                                       LOPC4930
      IF(IPRSUP.NE.0) GO TO 590                                         LOPC4940
      IF(ICONT1.EQ.2.AND.D0.LT.(D1-1.E-8)) GO TO 660                    LOPC4950
  590 GO TO(600,610,620,630,640),IMODE                                  LOPC4960
  600 IF(IPROP .EQ. 1) WRITE(6,840) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC4970
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC4980
      IF(IPROP .EQ. 2) WRITE(6,860) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC4990
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC5000
      GO TO 650                                                         LOPC5010
  610 IF(IPROP .EQ. 1) WRITE(6,890) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC5020
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC5030
      IF(IPROP .EQ. 2) WRITE(6,900) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC5040
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC5050
      GO TO 650                                                         LOPC5060
  620 IF(IPROP .EQ. 1) WRITE(6,870) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC5070
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC5080
      IF(IPROP .EQ. 2) WRITE(6,880) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC5090
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC5100
      GO TO 650                                                         LOPC5110
  630 IF(IPROP .EQ. 1) WRITE(6,910) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC5120
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC5130
      IF(IPROP .EQ. 2) WRITE(6,920) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC5140
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC5150
      GO TO 650                                                         LOPC5160
  640 IF(IPROP .EQ. 1) WRITE(6,930) D0,TV(1),PV(1),QR(1),WD5(1),WD6(1), LOPC5170
     1TT3(1),WDOTL(1,N),TEMPV(1),WLR(1)                                 LOPC5180
      IF(IPROP .EQ. 2) WRITE(6,940) D0,TV(2),PV(2),QR(2),WD5(2),WD6(2), LOPC5190
     1TT3(2),WDOTL(2,N),TEMPV(2),WLR(2)                                 LOPC5200
  650 IF(IPROP.EQ.2)WRITE(6,990 ) WVAPO1,TIMFLO,SUMVAP,VENTOB,PVAPNW,TVALOPC5210
     1PNW,EMTOTN                                                        LOPC5220
  660 IF(D0.LE.(D1-1.E-8)) ICONT3=1                                     LOPC5230
      IF(D0.LE.(D1-1.E-8)) GO TO 700                                    LOPC5240
  670 IF(ICONT2.LT.2.OR.ICONT1.EQ.0) ICONT3=2                           LOPC5250
      IF(N.EQ.IDATA.AND.ICONT3.EQ.2) ICONT3=0                           LOPC5260
      JSWITC(1)=JSWITC(2)=0                                             LOPC5270
      IF(ICONT3.EQ.2) GO TO 680                                         LOPC5280
      ICONT3=3                                                          LOPC5290
      IF(NIMPR.GE.NIMPID.OR.NIMPR.EQ.0) ICONT3=4                        LOPC5300
      IF(N.EQ.IDATA.AND.ICONT3.EQ.4) ICONT3=5                           LOPC5310
      IF(ICONT3.EQ.5) GO TO 690                                         LOPC5320
  680 N=N+1                                                             LOPC5330
      IF(ICONT3.EQ.3) N=N-1                                             LOPC5340
      JK=1                                                              LOPC5350
  690 TIME=TIME+D1/3600.                                                LOPC5360
      NIMPR=NIMPR+1                                                     LOPC5370
      IF(ICONT3.EQ.4.OR.ICONT3.EQ.2) NIMPR=0                            LOPC5380
      IF(ICONT3.GT.1.AND.ICONT3.LT.5) TOTI=0.                           LOPC5390
      WRITE(6,810)                                                      LOPC5400
      WRITE(6,830) SUMR(1),SUMV(1)                                      LOPC5410
      WRITE(6,820)                                                      LOPC5420
      WRITE(6,830) SUMR(2),SUMV(2)                                      LOPC5430
      WRITE(6,1000)                                                     LOPC5440
      WRITE(6,830) SWDOTL(1),SWDOTL(2)                                  LOPC5450
      WRITE(6,800)                                                      LOPC5460
      WRITE(6,850) TIME                                                 LOPC5470
      IF(ICONT3.EQ.5.AND.ICARD.EQ.1) GO TO 100                          LOPC5480
      IF(ICONT3.EQ.5.AND.ICARD.EQ.2) GO TO 120                          LOPC5490
      IF(ICONT3.EQ.4.OR.ICONT3.EQ.2) WRITE(6,760) N                     LOPC5500
      GO TO 710                                                         LOPC5510
  700 IF(ICONT1.NE.2) WRITE(6,790)                                      LOPC5520
      IF(IPRSUP.NE.0.AND.ICONT1.EQ.2) WRITE(6,790)                      LOPC5530
      GO TO 720                                                         LOPC5540
  710 WRITE(6,790)                                                      LOPC5550
  720 DO 730 IPROP=1,2                                                  LOPC5560
      PI(IPROP)=PVV(IPROP)                                              LOPC5570
      TI(IPROP)=TEMPV(IPROP)                                            LOPC5580
  730 TTI(IPROP)=TT3(IPROP)                                             LOPC5590
      IF(ICONT3.LE.1) D0=D0+D                                           LOPC5600
      IF(ICONT3.EQ.3) GO TO 150                                         LOPC5610
      IF(ICONT3.EQ.4.OR.ICONT3.EQ.2) GO TO 140                          LOPC5620
      GO TO 190                                                         LOPC5630
  740 FORMAT(8I10)                                                      LOPC5640
  750 FORMAT(8F10.3)                                                    LOPC5650
  760 FORMAT(32H ******************* EVENT NO.  ,I3,22H  ***************LOPC5660
     1*****/)                                                           LOPC5670
  770 FORMAT(23H   TOTAL IMPULSE,LB-SEC)                                LOPC5680
  780 FORMAT(6X,F10.2)                                                  LOPC5690
  790 FORMAT(122H   PROP     MODE       TIME   T.INJECT  VAP.PRES  HEAT LOPC5700
     1RATE  TANK INFLOW  TANK OUTFLOW  T.WALL  LIQ.FLOW  T.VAPOR   LIQUILOPC5710
     2D)                                                                LOPC5720
  800 FORMAT(22H   ACCUMULATED TIME,HR)                                 LOPC5730
  810 FORMAT(44H ACCUM H2 VAPOR INFLOW   ACCUMULATED H2 VENT)           LOPC5740
  820 FORMAT(44H ACCUM O2 VAPOR INFLOW   ACCUMULATED O2 VENT)           LOPC5750
  830 FORMAT(4X,F12.5,9X,F12.5)                                         LOPC5760
  840 FORMAT(1X,18HHYDROGEN  FIRING  ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5770
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5780
  850 FORMAT(6X,F12.5)                                                  LOPC5790
  860 FORMAT(1X,18HOXYGEN    FIRING  ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5800
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5810
  870 FORMAT(1X,18HHYDROGEN  FIR/VENT,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5820
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5830
  880 FORMAT(1X,18HOXYGEN    FIR/VENT,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5840
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5850
  890 FORMAT(1X,18HHYDROGEN  FIR/CHG ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5860
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5870
  900 FORMAT(1X,18HOXYGEN    FIR/CHG ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5880
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5890
  910 FORMAT(1X,18HHYDROGEN  IDLE    ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5900
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5910
  920 FORMAT(1X,18HOXYGEN    IDLE    ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5920
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5930
  930 FORMAT(1X,18HHYDROGEN  VENT    ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5940
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5950
  940 FORMAT(1X,18HOXYGEN    VENT    ,1X,F9.1,2X,F7.3,2X,F7.4,2X,F10.6,2LOPC5960
     1X,E11.4,2X,E11.4,F10.2,F8.2,F10.2,2F9.2)                          LOPC5970
  950 FORMAT(131H   CSTAR    ISP     PC   THRUST   WDOTH  WDOTO   O/F   LOPC5980
     1 PH2    PO2   TFHEXH     TFHEXO     PHEXH  PHEXO   AIRH   AIRO  P/LOPC5990
     2P H  P/P O)                                                       LOPC6000
  960 FORMAT(1X,2F8.2,F7.2,F9.2,F6.2,F7.2,F7.3,2F7.2,2F11.4,6F7.2)      LOPC6010
  970 FORMAT(131H   CSTAR    ISP     PC   THRUST   WDOTH  WDOTO   O/F   LOPC6020
     1 PH2    PO2   TFHEXH     TFHEXO      ACTIVE HEX    AIRH   AIRO  P/LOPC6030
     2P H  P/P O)                                                       LOPC6040
  980 FORMAT(1X,2F8.2,F7.2,F9.2,F6.2,F7.2,F7.3,2F7.2,2F11.4,14X,4F7.2)  LOPC6050
  990 FORMAT(8H WVAPOR=,F10.4,9H  DELPH2=,F10.4,9H  SUMVAP=,F10.4,9H  DELOPC6060
     1LPO2=,F10.4,6H PVAP=,F10.4,6H TVAP=,F10.4,6H MTOT=,F10.4/)        LOPC6070
 1000 FORMAT(46H ACCUM H2 LIQUID MIXED   ACCUM O2 LIQUID MIXED)         LOPC6080
 1010 FORMAT(35H ********** MISSION TOTAL IMPULSE  ,E15.8,11H **********LOPC6090
     1/)                                                                LOPC6100
      END                                                                      -
      SUBROUTINE SETVAR                                                 SETV1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  SETV1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUSETV1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOSETV1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WSETV1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RSETV1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       SETV1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDSETV1070
     1IN                                                                SETV1080
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), SETV1090
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RASETV1100
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXSETV1110
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     SETV1120
      W=WM(IPROP)                                                       SETV1130
      H1=HP(IPROP)                                                      SETV1140
      P0=PR(IPROP)                                                      SETV1150
      P2=PU(IPROP)                                                      SETV1160
      P1=PL(IPROP)                                                      SETV1170
      P5=PI(IPROP)                                                      SETV1180
      V=VOL(IPROP)                                                      SETV1190
      T=TI(IPROP)                                                       SETV1200
      WTANK=WT(IPROP)                                                   SETV1210
      T3=TTI(IPROP)                                                     SETV1220
      A=AS(IPROP)                                                       SETV1230
      W2=WDOT(IPROP,N)                                                  SETV1240
      DIA=DIAT(IPROP)                                                   SETV1250
      RATIO=RATRE(IPROP)                                                SETV1260
      XXX=XXT(IPROP)                                                    SETV1270
      RSWITC=RPTS(IPROP)                                                SETV1280
      RETURN                                                            SETV1290
      END                                                                      -
      SUBROUTINE LPC2                                                   LPC21000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  LPC21010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SULPC21020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOLPC21030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WLPC21040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RLPC21050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       LPC21060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDLPC21070
     1IN                                                                LPC21080
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), LPC21090
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RALPC21100
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXLPC21110
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     LPC21120
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVLPC21130
     1,CVBARL,UBARV,UBARL,VLV                                           LPC21140
      COMMON/LIST8/ELPANL(2),THIPAN(2),DFLOW(2),PLOAD(2),TLOA D(2),HLOADLPC21150
     1(2),VISL(2),CONDL(2),CPL(2),TSATL(2), HSATL(2),HSATV(2),VISV(2),COLPC21160
     2NDV(2),CPV(2),TF(20), NTUBE(2),PGAS,TGAS,TTWALL,TUBESP(2),TDIFF,TALPC21170
     3U(100),PHEX(2) ,ITERPP,TFHX(2),IHEAT,CONSTK,SUMVAP,WVAPO1,JK,DELPXLPC21180
     4(2)                                                               LPC21190
      COMMON/LIST9/TIMFLV,PVAPNW,PVAPSV,TVAPNW,TVAPSV,ITESTR, EMTOT,EMTOLPC21200
     1TN,EMVENT,ISW,VTANK,DTANK,QDTLO2,HVAPOR,TOTVAP,IC1,I1P,ZKK,QDTVO2 LPC21210
     2,PDIFF                                                            LPC21220
      COMMON/LIST12/WDOTL(2,100),SWDOTL(2),ICONTR,DSD(2),D1,WD5(2) ,NSWILPC21230
     1TC(2)                                                             LPC21240
      DIMENSION WOUT(2)                                                 LPC21250
      ISWITC=0                                                          LPC21260
      ITIME=0                                                           LPC21270
      JTIME=0                                                           LPC21280
      IVENT=0                                                           LPC21290
      KIDLE=0                                                           LPC21300
      NSWITC(1)=NSWITC(2)=0                                             LPC21310
      TITOT=0.                                                          LPC21320
      TSS3=((.1714E-08*.67*A*T0**4-Q0*A)/(.1714E-08*.67*A))**.25        LPC21330
      R=1545.                                                           LPC21340
  100 W0=P5*V*144.*W/(R*T)                                              LPC21350
      P=P5                                                              LPC21360
      IF(ICONTR.NE.2) GO TO 110                                         LPC21370
      KSWITC(IPROP)=1                                                   LPC21380
      IF((P/T).GT.RSWITC) KSWITC(IPROP)=0                               LPC21390
  110 IF(ISWITC.EQ.11) GO TO 330                                        LPC21400
      IF(ISWITC.EQ.22) GO TO 300                                        LPC21410
      IF(ISWITC.EQ.33) GO TO 150                                        LPC21420
      IF(ISWITC.EQ.44) GO TO 490                                        LPC21430
      IF(ICONTR.NE.2) GO TO 120                                         LPC21440
      IF(ISWITC.EQ.55) GO TO 400                                        LPC21450
      IF(W2.NE.0.) LSWITC(IPROP)=0                                      LPC21460
  120 IF(W2.NE.0.) GO TO 140                                            LPC21470
      IF(P .GE. P0) GO TO 490                                           LPC21480
      IF(ICONTR.NE.2) GO TO 130                                         LPC21490
      IF(LSWITC(IPROP).EQ.1) GO TO 400                                  LPC21500
      IF(P.LT.P2.AND.(P/T).LT.(RSWITC-1.E-4)) GO TO 520                 LPC21510
  130 GO TO 400                                                         LPC21520
  140 IF(P .GE. P0) GO TO 300                                           LPC21530
      IF(ICONTR.NE.2.AND.P.LE.P1) GO TO 330                             LPC21540
      IF(ICONTR.NE.2.AND.WD5(IPROP).NE.0..AND.P.LT.P2.AND.D0.LE.(D1-1.E-LPC21550
     18)) GO TO 330                                                     LPC21560
      IF(ICONTR.NE.2) GO TO 150                                         LPC21570
      IF(P.LT.P1.AND.(P/T).LT.RSWITC) GO TO 330                         LPC21580
      IF(WD5(IPROP).NE.0..AND.P.LT.P2.AND.D0.LE.(D1-1.E-8)) GO TO 330   LPC21590
  150 W5=0.                                                             LPC21600
      W6=W2                                                             LPC21610
      IMODE=1                                                           LPC21620
      CALL THERMO                                                       LPC21630
      IF(ISWITC.EQ.3) IMODE=2                                           LPC21640
      IF(IVENT.GT.0) IMODE=3                                            LPC21650
      IF(ISWITC.NE.1) GO TO 160                                         LPC21660
      D=DSAVE-D                                                         LPC21670
      D0=D0+D                                                           LPC21680
      P5=P                                                              LPC21690
      ISWITC=11                                                         LPC21700
      GO TO 100                                                         LPC21710
  160 IF(ISWITC.NE.2) GO TO 180                                         LPC21720
      IF(ITIME .EQ. 1) D=DSAVE2-D                                       LPC21730
      IF(ITIME .EQ. 1) GO TO 170                                        LPC21740
      D=DSAVE-D                                                         LPC21750
      D0=D0+D                                                           LPC21760
  170 P5=P                                                              LPC21770
      ISWITC=22                                                         LPC21780
      GO TO 100                                                         LPC21790
  180 IF(PTWO .GE. P1) GO TO 230                                        LPC21800
      IF(ISWITC.EQ.11) GO TO 630                                        LPC21810
      IF(ICONTR.NE.2) GO TO 200                                         LPC21820
      IF(KSWITC(IPROP).EQ.1) GO TO 200                                  LPC21830
      IF(RTWO.GE.RSWITC) GO TO 230                                      LPC21840
      D0=D0-D                                                           LPC21850
      ACONST=(RONE-RTWO)/(TONE-TTWO)                                    LPC21860
      BCONST=RTWO-ACONST*TTWO                                           LPC21870
      KSWITC(IPROP)=1                                                   LPC21880
      IF(ITER.NE.2) GO TO 190                                           LPC21890
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC21900
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LPC21910
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC21920
  190 D=(RSWITC-BCONST)/ACONST-TONE                                     LPC21930
      GO TO 220                                                         LPC21940
  200 D0=D0-D                                                           LPC21950
      ACONST=(PONE-PTWO)/(TONE-TTWO)                                    LPC21960
      BCONST=PTWO-ACONST*TTWO                                           LPC21970
      IF(ITER.NE.2) GO TO 210                                           LPC21980
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC21990
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LPC22000
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC22010
  210 D=(P1-BCONST)/ACONST-TONE                                         LPC22020
  220 D0=D0+D                                                           LPC22030
      ISWITC=1                                                          LPC22040
      P=PONE                                                            LPC22050
      T=TPONE                                                           LPC22060
      T3=TONE3                                                          LPC22070
      W0=WONE                                                           LPC22080
      GO TO 150                                                         LPC22090
  230 IF(PTWO .LE. P0) GO TO 630                                        LPC22100
      IF(ITIME .EQ. 1) GO TO 260                                        LPC22110
      IF(IVENT.EQ.0) GO TO 250                                          LPC22120
      TIMECO=D                                                          LPC22130
      IF(ITER.NE.2) GO TO 240                                           LPC22140
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC22150
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LPC22160
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC22170
  240 D=D*.1                                                            LPC22180
      TITOT=D                                                           LPC22190
      ITIME=1                                                           LPC22200
      ISWITC=0                                                          LPC22210
      GO TO 290                                                         LPC22220
  250 D0=D0-D                                                           LPC22230
  260 ACONST=(PONE-PTWO)/(TONE-TTWO)                                    LPC22240
      BCONST=PTWO-ACONST*TTWO                                           LPC22250
      IF(ITER.NE.2) GO TO 270                                           LPC22260
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC22270
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LPC22280
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC22290
  270 D=(P0-BCONST)/ACONST-TONE                                         LPC22300
      IF(ITIME .EQ. 1) GO TO 280                                        LPC22310
      D0=D0+D                                                           LPC22320
      TIMEV=D0                                                          LPC22330
  280 ISWITC=2                                                          LPC22340
  290 P=PONE                                                            LPC22350
      T=TPONE                                                           LPC22360
      T3=TONE3                                                          LPC22370
      W0=WONE                                                           LPC22380
      GO TO 150                                                         LPC22390
  300 TEMP=T                                                            LPC22400
      CALL PROP                                                         LPC22410
      GAMMA=R/(778.26*W*C1)+1.                                          LPC22420
      FUNCT=(2./(GAMMA+1.))**((GAMMA+1.)/(GAMMA-1.))                    LPC22430
      TFINAL=T*(PRES(IPROP)/P0)**((GAMMA-1.)/GAMMA)                     LPC22440
      TAVG=(T+TFINAL)*.5                                                LPC22450
      PAVG=(P0+PRES(IPROP))*.5                                          LPC22460
      DELTAW=(144.*V*W/R)*(P0/T-PRES(IPROP)/TFINAL)                     LPC22470
      W3=AVENT(IPROP)*144.*PAVG*SQRT(GAMMA*32.174*W*FUNCT/R)/SQRT(TAVG) LPC22480
      W3=W3+W2                                                          LPC22490
      IF(WLR(IPROP) .LE. 0.) DWDBO1=0.                                  LPC22500
      IF(WLR(IPROP) .LE. 0.) WDBO2=0.                                   LPC22510
      IF(WLR(IPROP) .LE. 0.) GO TO 310                                  LPC22520
      PRESS=P0                                                          LPC22530
      CALL PROP3                                                        LPC22540
      SL1=SL                                                            LPC22550
      PRESS=PRES(IPROP)                                                 LPC22560
      CALL PROP3                                                        LPC22570
      SL2=SL                                                            LPC22580
      DWDBO1=WLR(IPROP)*(SL1-SL2)/SLV                                   LPC22590
      PRESS=PAVG                                                        LPC22600
      CALL PROP3                                                        LPC22610
      CALL AREA                                                         LPC22620
      WDBO2=QOA(IPROP)*ALSA/(3600.*HLV)                                 LPC22630
  310 DELTAT=(DELTAW+DWDBO1)/(W3-WDBO2)                                 LPC22640
      IF(ITER.NE.2) GO TO 320                                           LPC22650
      WLR(IPROP)=WLR(IPROP)-DWDBO1-WDBO2*DELTAT                         LPC22660
      SUMV(IPROP)=SUMV(IPROP)+(W3-W2)*DELTAT                            LPC22670
  320 P=PRES(IPROP)                                                     LPC22680
      T=TFINAL                                                          LPC22690
      W0=P*V*144.*W/(R*T)                                               LPC22700
      ISWITC=0                                                          LPC22710
      IVENT=IVENT+1                                                     LPC22720
      GO TO 150                                                         LPC22730
  330 W5=W2*RATIO                                                       LPC22740
      W6=W2                                                             LPC22750
      IF(ISWITC.EQ.11) NSWITC(IPROP)=1                                  LPC22760
      IMODE=2                                                           LPC22770
      CALL THERMO                                                       LPC22780
      IF(ISWITC.EQ.3) P=P2                                              LPC22790
      IF(JTIME .EQ. 0) GO TO 340                                        LPC22800
      D=DSAVE3-D                                                        LPC22810
      P=P2                                                              LPC22820
      ISWITC=11                                                         LPC22830
      GO TO 150                                                         LPC22840
  340 IF(P.LE.P2) GO TO 350                                             LPC22850
      IF(ISWITC.NE.11) GO TO 350                                        LPC22860
      DSAVE3=D                                                          LPC22870
      JTIME=1                                                           LPC22880
      GO TO 370                                                         LPC22890
  350 IF(ISWITC.NE.3) GO TO 360                                         LPC22900
      D=DSAVE-D                                                         LPC22910
      D0=D0+D                                                           LPC22920
      P5=P                                                              LPC22930
      ISWITC=33                                                         LPC22940
      GO TO 100                                                         LPC22950
  360 IF(PTWO .LE. P2) GO TO 630                                        LPC22960
      D0=D0-D                                                           LPC22970
  370 ACONST=(PONE-PTWO)/(TONE-TTWO)                                    LPC22980
      BCONST=PTWO-ACONST*TTWO                                           LPC22990
      IF(ITER.NE.2) GO TO 380                                           LPC23000
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC23010
      SUMR(IPROP)=SUMR(IPROP)-W5*D                                      LPC23020
      SWDOTL(IPROP)=SWDOTL(IPROP)-WDOTL(IPROP,N)*D                      LPC23030
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC23040
  380 D=(P2-BCONST)/ACONST-TONE                                         LPC23050
      IF(JTIME .EQ. 1) GO TO 390                                        LPC23060
      D0=D0+D                                                           LPC23070
  390 ISWITC=3                                                          LPC23080
      P=PONE                                                            LPC23090
      T=TPONE                                                           LPC23100
      T3=TONE3                                                          LPC23110
      W0=WONE                                                           LPC23120
      GO TO 330                                                         LPC23130
  400 W5=0.                                                             LPC23140
      W6=0.                                                             LPC23150
      IMODE=4                                                           LPC23160
      CALL THERMO                                                       LPC23170
      IF(IVENT.GT.0) IMODE=5                                            LPC23180
      IF(ISWITC.NE.4) GO TO 420                                         LPC23190
      IF(ITIME .EQ. 1) D=DSAVE2-D                                       LPC23200
      IF(ITIME .EQ. 1) GO TO 410                                        LPC23210
      D=DSAVE-D                                                         LPC23220
      D0=D0+D                                                           LPC23230
  410 P5=P                                                              LPC23240
      ISWITC=44                                                         LPC23250
      GO TO 100                                                         LPC23260
  420 IF(PTWO .LE. P0) GO TO 630                                        LPC23270
      IF(ITIME .EQ. 1) GO TO 450                                        LPC23280
      IF(IVENT.EQ.0) GO TO 440                                          LPC23290
      TIMECO=D                                                          LPC23300
      IF(ITER.NE.2) GO TO 430                                           LPC23310
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC23320
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC23330
  430 D=D*.1                                                            LPC23340
      TITOT=D                                                           LPC23350
      ITIME=1                                                           LPC23360
      ISWITC=0                                                          LPC23370
      GO TO 480                                                         LPC23380
  440 D0=D0-D                                                           LPC23390
  450 ACONST=(PONE-PTWO)/(TONE-TTWO)                                    LPC23400
      BCONST=PTWO-ACONST*TTWO                                           LPC23410
      IF(ITER.NE.2) GO TO 460                                           LPC23420
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC23430
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC23440
  460 D=(P0-BCONST)/ACONST-TONE                                         LPC23450
      IF(ITIME .EQ. 1) GO TO 470                                        LPC23460
      D0=D0+D                                                           LPC23470
      TIMEV=D0                                                          LPC23480
  470 ISWITC=4                                                          LPC23490
  480 P=PONE                                                            LPC23500
      T=TPONE                                                           LPC23510
      T3=TONE3                                                          LPC23520
      W0=WONE                                                           LPC23530
      GO TO 400                                                         LPC23540
  490 TEMP=T                                                            LPC23550
      CALL PROP                                                         LPC23560
      GAMMA=R/(778.26*W*C1)+1.                                          LPC23570
      FUNCT=(2./(GAMMA+1.))**((GAMMA+1.)/(GAMMA-1.))                    LPC23580
      TFINAL=T*(PRES(IPROP)/P0)**((GAMMA-1.)/GAMMA)                     LPC23590
      TAVG=(T+TFINAL)*.5                                                LPC23600
      PAVG=(P0+PRES(IPROP))*.5                                          LPC23610
      DELTAW=(144.*V*W/R)*(P0/T-PRES(IPROP)/TFINAL)                     LPC23620
      W3=AVENT(IPROP)*144.*PAVG*SQRT(GAMMA*32.174*W*FUNCT/R)/SQRT(TAVG) LPC23630
      IF(WLR(IPROP) .LE. 0.) DWDBO1=0.                                  LPC23640
      IF(WLR(IPROP) .LE. 0.) WDBO2=0.                                   LPC23650
      IF(WLR(IPROP) .LE. 0.) GO TO 500                                  LPC23660
      PRESS=P0                                                          LPC23670
      CALL PROP3                                                        LPC23680
      SL1=SL                                                            LPC23690
      PRESS=PRES(IPROP)                                                 LPC23700
      CALL PROP3                                                        LPC23710
      SL2=SL                                                            LPC23720
      DWDBO1=WLR(IPROP)*(SL1-SL2)/SLV                                   LPC23730
      PRESS=PAVG                                                        LPC23740
      CALL PROP3                                                        LPC23750
      CALL AREA                                                         LPC23760
      WDBO2=QOA(IPROP)*ALSA/(3600.*HLV)                                 LPC23770
  500 DELTAT=(DELTAW+DWDBO1)/(W3-WDBO2)                                 LPC23780
      IF(ITER.NE.2) GO TO 510                                           LPC23790
      WLR(IPROP)=WLR(IPROP)-DWDBO1-WDBO2*DELTAT                         LPC23800
      SUMV(IPROP)=SUMV(IPROP)+W3*DELTAT                                 LPC23810
  510 P=PRES(IPROP)                                                     LPC23820
      T=TFINAL                                                          LPC23830
      W0=P*V*144.*W/(R*T)                                               LPC23840
      ISWITC=0                                                          LPC23850
      IVENT=IVENT+1                                                     LPC23860
      GO TO 400                                                         LPC23870
  520 IF(JSWITC(IPROP).EQ.1) GO TO 530                                  LPC23880
      POT=P/T                                                           LPC23890
      DELWTV=(RSWITC-POT)*V*144.*W/R                                    LPC23900
      WOUT(IPROP)=DELWTV/(10.*D)                                        LPC23910
      JSWITC(IPROP)=1                                                   LPC23920
  530 W5=WOUT(IPROP)                                                    LPC23930
      W6=0.                                                             LPC23940
  540 IMODE=4                                                           LPC23950
      CALL THERMO                                                       LPC23960
      IF(ISWITC.NE.5) GO TO 570                                         LPC23970
      IF(KIDLE.EQ.1) GO TO 550                                          LPC23980
      IF(ABS(P/T-RSWITC).LE..5E-3) GO TO 560                            LPC23990
      ISWITC=0                                                          LPC24000
      D0=D0-D                                                           LPC24010
      D=DSAVE                                                           LPC24020
      GO TO 620                                                         LPC24030
  550 IF(ABS(P-P2).LE..1) GO TO 560                                     LPC24040
      ISWITC=0                                                          LPC24050
      D0=D0-D                                                           LPC24060
      D=DSAVE                                                           LPC24070
      GO TO 620                                                         LPC24080
  560 D=DSAVE-D                                                         LPC24090
      D0=D0+D                                                           LPC24100
      P5=P                                                              LPC24110
      ISWITC=55                                                         LPC24120
      LSWITC(IPROP)=1                                                   LPC24130
      GO TO 100                                                         LPC24140
  570 IF(PTWO.LE.P2.AND.RTWO.LE.RSWITC) GO TO 630                       LPC24150
      D0=D0-D                                                           LPC24160
      IF(ITER.EQ.2) SUMR(IPROP)=SUMR(IPROP)-W5*D                        LPC24170
      IF(PTWO.GT.P2) GO TO 590                                          LPC24180
      ACONST=(RONE-RTWO)/(TONE-TTWO)                                    LPC24190
      BCONST=RTWO-ACONST*TTWO                                           LPC24200
      IF(ITER.NE.2) GO TO 580                                           LPC24210
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC24220
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC24230
  580 D=(RSWITC-BCONST)/ACONST-TONE                                     LPC24240
      GO TO 610                                                         LPC24250
  590 ACONST=(PONE-PTWO)/(TONE-TTWO)                                    LPC24260
      BCONST=PTWO-ACONST*TTWO                                           LPC24270
      IF(ITER.NE.2) GO TO 600                                           LPC24280
      WLR(IPROP)=WLR(IPROP)+WDOTBO(IPROP)*D                             LPC24290
      IF(IPROP.EQ.2) SUMVAP=SUMVAP-WVAPO1*D                             LPC24300
  600 D=(P2-BCONST)/ACONST-TONE                                         LPC24310
      KIDLE=1                                                           LPC24320
  610 D0=D0+D                                                           LPC24330
      ISWITC=5                                                          LPC24340
  620 P=PONE                                                            LPC24350
      T=TPONE                                                           LPC24360
      T3=TONE3                                                          LPC24370
      W0=WONE                                                           LPC24380
      IF(ISWITC.EQ.0) D=DSAVE*.5                                        LPC24390
      IF(ISWITC.EQ.0) D0=D0+D                                           LPC24400
      GO TO 540                                                         LPC24410
  630 IF(ITIME .NE. 1) GO TO 640                                        LPC24420
      D=DSAVE2                                                          LPC24430
      TITOT=TITOT+D                                                     LPC24440
      W0=P*V*144.*W/(R*T)                                               LPC24450
      IF(TITOT .LT. (TIMECO-1.E-8)) GO TO 150                           LPC24460
  640 IF(ISWITC.EQ.11) DSD(IPROP)=D                                     LPC24470
      IF(ISWITC.EQ.33) DSD(IPROP)=DSAVE-D                               LPC24480
      D=DSAVE                                                           LPC24490
      IF(ISWITC.NE.11.AND.ISWITC.NE.33) DSD(IPROP)=D                    LPC24500
      IVENT=0                                                           LPC24510
      RETURN                                                            LPC24520
      END                                                                      -
      SUBROUTINE THERMO                                                 THER1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  THER1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUTHER1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOTHER1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WTHER1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RTHER1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       THER1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDTHER1070
     1IN                                                                THER1080
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), THER1090
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RATHER1100
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXTHER1110
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     THER1120
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVTHER1130
     1,CVBARL,UBARV,UBARL,VLV                                           THER1140
      COMMON/LIST8/ELPANL(2),THIPAN(2),DFLOW(2),PLOAD(2),TLOA D(2),HLOADTHER1150
     1(2),VISL(2),CONDL(2),CPL(2),TSATL(2), HSATL(2),HSATV(2),VISV(2),COTHER1160
     2NDV(2),CPV(2),TF(20), NTUBE(2),PGAS,TGAS,TTWALL,TUBESP(2),TDIFF,TATHER1170
     3U(100),PHEX(2) ,ITERPP,TFHX(2),IHEAT,CONSTK,SUMVAP,WVAPO1,JK,DELPXTHER1180
     4(2)                                                               THER1190
      COMMON/LIST9/TIMFLV,PVAPNW,PVAPSV,TVAPNW,TVAPSV,ITESTR, EMTOT,EMTOTHER1200
     1TN,EMVENT,ISW,VTANK,DTANK,QDTLO2,HVAPOR,TOTVAP,IC1,I1P,ZKK,QDTVO2 THER1210
     2,PDIFF                                                            THER1220
      COMMON/LIST12/WDOTL(2,100),SWDOTL(2),ICONTR,DSD(2),D1,WD5(2) ,NSWITHER1230
     1TC(2)                                                             THER1240
      IF(IVENT.GT.0.AND.ISWITC.EQ.44) EMTOT=EMTOTN                      THER1250
      IF(IVENT.GT.0.AND.ISWITC.EQ.44) PVAPSV=PVAPNW                     THER1260
      IF(IVENT.GT.0.AND.ISWITC.EQ.44) TVAPSV=TVAPNW                     THER1270
      WDOTBO(IPROP)=0.                                                  THER1280
      WVAPOR=0.                                                         THER1290
      QDTVO2=0.                                                         THER1300
      LLL=1                                                             THER1310
      MMM=1                                                             THER1320
      IF(ISWITC.EQ.11) GO TO 100                                        THER1330
      IF(ISWITC.NE.0) GO TO 110                                         THER1340
  100 PONE=P                                                            THER1350
      TPONE=T                                                           THER1360
      RONE=P/T                                                          THER1370
      TONE3=T3                                                          THER1380
      WONE=W0                                                           THER1390
      TONE=D0-D                                                         THER1400
      TTWO=D0                                                           THER1410
      IF(ISWITC.EQ.11) GO TO 110                                        THER1420
      IF(IVENT.GT.0) GO TO 110                                          THER1430
      DSAVE=D                                                           THER1440
  110 TEMP=T                                                            THER1450
      IF(ISWITC.NE.0) GO TO 120                                         THER1460
      IF(IVENT .GT. 1) GO TO 120                                        THER1470
      IF(ITIME .EQ. 1) DSAVE2=D                                         THER1480
  120 PRESS=P                                                           THER1490
      CALL CONVEC                                                       THER1500
      H3=HCONV                                                          THER1510
      Q=H3*A*(T3-T)/3600.                                               THER1520
      CALL PROP                                                         THER1530
      CALL PROP3                                                        THER1540
      IF(IPASHX .NE. 1) GO TO 130                                       THER1550
      TTWALL=T3                                                         THER1560
      PGAS=P                                                            THER1570
      TGAS=T                                                            THER1580
      ITERPP=0                                                          THER1590
      CALL TANKHX                                                       THER1600
  130 TEMP=T                                                            THER1610
      CALL PROP                                                         THER1620
      IC1=1                                                             THER1630
      IF(IPROP.EQ.1) WVAPO1=0.                                          THER1640
      IF(IPROP.EQ.1) GO TO 140                                          THER1650
      IF(EMTOT.LE.2.0) WVAPO1=0.                                        THER1660
      IF(EMTOT.LE.2.0) GO TO 140                                        THER1670
      CALL COMPAR                                                       THER1680
  140 W9=W5-W6+WDOTBO(IPROP)+WVAPO1                                     THER1690
      TEMP=T                                                            THER1700
      CALL PROP                                                         THER1710
      T1=T+((Q+WDOTBO(IPROP)*HV+W5*H1-W6*H2-W9*U2+WVAPO1*HVAPOR)/((W0+W9THER1720
     1*D*.5)*C1))*D                                                     THER1730
      P6=R*(W0+W9*D)*T1/(V*W*144.)                                      THER1740
      DELTAP=P6-P                                                       THER1750
      IF(WLR(IPROP) .LE. 0.) GO TO 180                                  THER1760
      IF(LLL .EQ. 4) GO TO 180                                          THER1770
      IF(DELTAP .GE. 0.) GO TO 150                                      THER1780
      PRESS=P                                                           THER1790
      CALL PROP3                                                        THER1800
      SL1=SL                                                            THER1810
      PRESS=P6                                                          THER1820
      CALL PROP3                                                        THER1830
      SL2=SL                                                            THER1840
      WDBO1=WLR(IPROP)*(SL1-SL2)/(SLV*D)                                THER1850
      PRESS=(P+P6)*.5                                                   THER1860
      CALL PROP3                                                        THER1870
      CALL AREA                                                         THER1880
      WDBO2=QOA(IPROP)*ALSA/(3600.*HLV)                                 THER1890
      WDOTBO(IPROP)=WDBO1+WDBO2                                         THER1900
      GO TO 170                                                         THER1910
  150 IF(DELTAP .GT. 0.) GO TO 160                                      THER1920
      PRESS=P                                                           THER1930
      CALL PROP3                                                        THER1940
      CALL AREA                                                         THER1950
      WDOTBO(IPROP)=QOA(IPROP)*ALSA/(3600.*HLV)                         THER1960
      GO TO 170                                                         THER1970
  160 PRESS=(P+P6)*.5                                                   THER1980
      CALL PROP3                                                        THER1990
      CALL AREA                                                         THER2000
      WDOTBO(IPROP)=QOA(IPROP)*ALSA/(3600.*HLV)                         THER2010
  170 LLL=LLL+1                                                         THER2020
      GO TO 110                                                         THER2030
  180 T2=(T+T1)*.5                                                      THER2040
      TEMP=T2                                                           THER2050
      PRESS=(P+P6)*.5                                                   THER2060
      CALL CONVEC                                                       THER2070
      H3=HCONV                                                          THER2080
      Q=H3*A*(T3-T2)/3600.                                              THER2090
      QR=.1714E-8*.67*A*(T0**4-T3**4)/3600.                             THER2100
      IF(IHEAT.EQ.0.AND.QR.GT.0.) IHEAT=1                               THER2110
      IF(IPASHX .NE. 1) QEX=0.                                          THER2120
      IF(IPASHX .EQ. 1) QEX=W5*(H1-HLOAD(IPROP))                        THER2130
      QLIQ=QOA(IPROP)*ALSA/3600.                                        THER2140
      IF(IPROP .EQ. 1) GO TO 200                                        THER2150
      T4=T3+(QR-Q-QEX-QLIQ-QDTVO2)*D/(C2*WTANK)                         THER2160
      IF(IHEAT.EQ.0.AND.T4.GT.TSS3) GO TO 190                           THER2170
      IF(T4.GT.TSS3) T4=TSS3                                            THER2180
  190 T5=(T3+T4)*.5                                                     THER2190
      GO TO 220                                                         THER2200
  200 TINS2=T3-3600.*Q*THKIN/(CONDIN*A)                                 THER2210
      T4=T3+(QR-Q-QEX-QLIQ)*D/(C2*WTANK+CPINS*WINS*.5)-CPINS*WINS*(TINS2THER2220
     1-TINS1)/(2.*C2*WTANK+CPINS*WINS)                                  THER2230
      IF(IHEAT.EQ.0.AND.T4.GT.TSS3) GO TO 210                           THER2240
      IF(T4 .GT. TSS3) T4=TSS3                                          THER2250
  210 T5=(T3+T4)*.5                                                     THER2260
  220 TEMP=T2                                                           THER2270
      PRESS=P                                                           THER2280
      CALL CONVEC                                                       THER2290
      H3=HCONV                                                          THER2300
      Q=H3*A*(T5-T2)/3600.                                              THER2310
      CALL PROP                                                         THER2320
      IF(WLR(IPROP) .LT. 0.) WLR(IPROP)=0.                              THER2330
      IF(WLR(IPROP) .EQ. 0.) WDOTBO(IPROP)=0.                           THER2340
      IC1=2                                                             THER2350
      IF(IPROP.EQ.1) WVAPO1=0.                                          THER2360
      IF(IPROP.EQ.1) GO TO 230                                          THER2370
      IF(EMTOT.LE.2.0) WVAPO1=0.                                        THER2380
      IF(EMTOT.LE.2.0) GO TO 230                                        THER2390
      T3SAVE=T3                                                         THER2400
      T3=T5                                                             THER2410
      CALL COMPAR                                                       THER2420
      T3=T3SAVE                                                         THER2430
  230 W9=W5-W6+WDOTBO(IPROP)+WVAPO1                                     THER2440
      IF(IPASHX .NE. 1) GO TO 240                                       THER2450
      TTWALL=T5                                                         THER2460
      PGAS=(P+P6)*.5                                                    THER2470
      TGAS=T2                                                           THER2480
      IF(ITER.EQ.2) ITERPP=1                                            THER2490
      CALL TANKHX                                                       THER2500
  240 TEMP=T2                                                           THER2510
      CALL PROP                                                         THER2520
      T1=T+((Q+WDOTBO(IPROP)*HV+W5*H1-W6*H2-W9*U2+WVAPO1*HVAPOR)/((W0+W9THER2530
     1*D*.5)*C1))*D                                                     THER2540
      TEMP=(T+T1)*.5                                                    THER2550
      CALL PROP                                                         THER2560
      ENTH(IPROP)=H2                                                    THER2570
      PP1=P                                                             THER2580
      P6=R*(W0+W9*D)*T1/(V*W*144.)                                      THER2590
      DELTAP=P6-PP1                                                     THER2600
      IF(WLR(IPROP) .LE. 0.) GO TO 280                                  THER2610
      IF(MMM .EQ. 4) GO TO 280                                          THER2620
      IF(DELTAP .GE. 0.) GO TO 250                                      THER2630
      PRESS=PP1                                                         THER2640
      CALL PROP3                                                        THER2650
      SL1=SL                                                            THER2660
      PRESS=P6                                                          THER2670
      CALL PROP3                                                        THER2680
      SL2=SL                                                            THER2690
      WDBO1=WLR(IPROP)*(SL1-SL2)/(SLV*D)                                THER2700
      PRESS=(P6+PP1)*.5                                                 THER2710
      CALL PROP3                                                        THER2720
      CALL AREA                                                         THER2730
      WDBO2=QOA(IPROP)*ALSA/(3600.*HLV)                                 THER2740
      WDOTBO(IPROP)=WDBO1+WDBO2                                         THER2750
      GO TO 270                                                         THER2760
  250 IF(DELTAP .GT. 0.) GO TO 260                                      THER2770
      PRESS=P6                                                          THER2780
      CALL PROP3                                                        THER2790
      CALL AREA                                                         THER2800
      WDOTBO(IPROP)=QOA(IPROP)*ALSA/(3600.*HLV)                         THER2810
      GO TO 270                                                         THER2820
  260 PRESS=(P6+PP1)*.5                                                 THER2830
      CALL PROP3                                                        THER2840
      CALL AREA                                                         THER2850
      WDOTBO(IPROP)=QOA(IPROP)*ALSA/(3600.*HLV)                         THER2860
  270 MMM=MMM+1                                                         THER2870
      GO TO 220                                                         THER2880
  280 IF(ITER.NE.2) GO TO 290                                           THER2890
      WLR(IPROP)=WLR(IPROP)-WDOTBO(IPROP)*D                             THER2900
      SUMR(IPROP)=SUMR(IPROP)+W5*D                                      THER2910
      IF(IPROP.EQ.2) SUMVAP=SUMVAP+WVAPO1*D                             THER2920
      SWDOTL(IPROP)=SWDOTL(IPROP)+WDOTL(IPROP,N)*D                      THER2930
  290 P=R*(W0+W9*D)*T1/(V*W*144.)                                       THER2940
      IF(ISWITC.EQ.0) PTWO=P                                            THER2950
      IF(ISWITC.EQ.11) PTWO=P                                           THER2960
      T=T1                                                              THER2970
      IF(ISWITC.EQ.0) RTWO=P/T                                          THER2980
      IF(ISWITC.EQ.11) RTWO=P/T                                         THER2990
      W0=P*V*144.*W/(R*T)                                               THER3000
      IF(IPASHX.EQ.2) TW=TWN                                            THER3010
      TEMP=(T+T1)*.5                                                    THER3020
      PRESS=(P+P6)*.5                                                   THER3030
      CALL CONVEC                                                       THER3040
      H3=HCONV                                                          THER3050
      Q=H3*A*(T5-TEMP)/3600.                                            THER3060
      QR=.1714E-8*.67*A*(T0**4-T5**4)/3600.                             THER3070
      IF(IPASHX .NE. 1) QEX=0.                                          THER3080
      IF(IPASHX .EQ. 1) QEX=W5*(H1-HLOAD(IPROP))                        THER3090
      IF(P .GT. P0) W0=P0*V*144.*W/(R*T)                                THER3100
      QLIQ=QOA(IPROP)*ALSA/3600.                                        THER3110
      IF(IPROP .EQ. 1) GO TO 300                                        THER3120
      T4=T3+(QR-Q-QEX-QLIQ-QDTVO2)*D/(C2*WTANK)                         THER3130
      IF(IHEAT.EQ.0.AND.T4.GT.TSS3) GO TO 310                           THER3140
      IF(T4.GT.TSS3) T4=TSS3                                            THER3150
      GO TO 320                                                         THER3160
  300 TINS2=T3-3600.*Q*THKIN/(CONDIN*A)                                 THER3170
      T4=T3+(QR-Q-QEX-QLIQ)*D/(C2*WTANK+CPINS*WINS*.5)-CPINS*WINS*(TINS2THER3180
     1-TINS1)/(2.*C2*WTANK+CPINS*WINS)                                  THER3190
      IF(IHEAT.EQ.0.AND.T4.GT.TSS3) GO TO 310                           THER3200
      IF(T4 .GT. TSS3) T4=TSS3                                          THER3210
  310 TINS1=TINS2                                                       THER3220
  320 T3=T4                                                             THER3230
      RETURN                                                            THER3240
      END                                                                      -
      SUBROUTINE TANKHX                                                 TANK1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  TANK1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUTANK1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOTANK1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WTANK1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RTANK1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       TANK1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDTANK1070
     1IN                                                                TANK1080
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), TANK1090
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RATANK1100
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXTANK1110
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     TANK1120
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVTANK1130
     1,CVBARL,UBARV,UBARL,VLV                                           TANK1140
      COMMON/LIST8/ELPANL(2),THIPAN(2),DFLOW(2),PLOAD(2),TLOA D(2),HLOADTANK1150
     1(2),VISL(2),CONDL(2),CPL(2),TSATL(2), HSATL(2),HSATV(2),VISV(2),COTANK1160
     2NDV(2),CPV(2),TF(20), NTUBE(2),PGAS,TGAS,TTWALL,TUBESP(2),TDIFF,TATANK1170
     3U(100),PHEX(2) ,ITERPP,TFHX(2),IHEAT,CONSTK,SUMVAP,WVAPO1,JK,DELPXTANK1180
     4(2)                                                               TANK1190
      COMMON/LIST9/TIMFLV,PVAPNW,PVAPSV,TVAPNW,TVAPSV,ITESTR, EMTOT,EMTOTANK1200
     1TN,EMVENT,ISW,VTANK,DTANK,QDTLO2,HVAPOR,TOTVAP,IC1,I1P,ZKK,QDTVO2 TANK1210
     2,PDIFF                                                            TANK1220
      DIMENSION QUANT(30),AMACH2(20),RHS(20)                            TANK1230
      TSFDT=0.                                                          TANK1240
      H2PDT=0.                                                          TANK1250
      I2P=0                                                             TANK1260
      TTW=TTWALL                                                        TANK1270
      IHPR=0                                                            TANK1280
      DATA RHOPAN,CONDP/178.,.02015/,VISL(1),VISL(2),CONDL(1),CONDL(2)/ TANK1290
     1.61E-6,.92E-5,.15E-5,.19E-5/,CPL(1),CPL(2),TSATL(1),TSATL(2)/2.87,TANK1300
     2.412,42.41,178.6/,HSATL(1),HSATL(2),HSATV(1),HSATV(2)/-93.98,-50.7TANK1310
     3,87.38,36.6/,VISV(1),VISV(2),CONDV(1),CONDV(2)/.74E-7,.50E-6, .232TANK1320
     4E-6,.134E-6/,CPV(1),CPV(2)/3.26,.236/                             TANK1330
      IF(W5.GT.0.) GO TO 100                                            TANK1340
      GO TO 380                                                         TANK1350
  100 IF(D0.LE.5.) HPR=0.                                               TANK1360
      IF(D0.LE.5.) GO TO 140                                            TANK1370
      SUM=0.                                                            TANK1380
      NHPR=1                                                            TANK1390
      IHPR=1                                                            TANK1400
  110 QUANT(NHPR)=EXP(-(2.*(NHPR-1)+1.)**2*TDIFF*3.14159**2*D0/((TUBESP TANK1410
     1(IPROP)*12.)**2))                                                 TANK1420
      SUM=SUM+QUANT(NHPR)                                               TANK1430
      IF(NHPR.LT.2) GO TO 120                                           TANK1440
      IF((QUANT(NHPR)/SUM).LE..01) GO TO 130                            TANK1450
      IF(NHPR.GT.21) GO TO 130                                          TANK1460
  120 NHPR=NHPR+1                                                       TANK1470
      GO TO 110                                                         TANK1480
  130 IF(SUM.LT.1.) SUM=1.                                              TANK1490
      HPR=2.*CONDP/(TUBESP(IPROP)/2.)*SUM                               TANK1500
  140 AFLOW=3.141593*DFLOW(IPROP)*DFLOW(IPROP)*.25*NTUBE(IPROP)         TANK1510
      G=W5/AFLOW                                                        TANK1520
      RENL=G*DFLOW(IPROP)/(VISL(IPROP)*12.)                             TANK1530
      PRNL=VISL(IPROP)*CPL(IPROP)/CONDL(IPROP)                          TANK1540
      HL=.023*RENL**.8*PRNL**.4*CONDL(IPROP)*12./DFLOW(IPROP)           TANK1550
      HL1=HL                                                            TANK1560
      RENV=G*DFLOW(IPROP)/(VISV(IPROP)*12.)                             TANK1570
      PRNV=VISV(IPROP)*CPV(IPROP)/CONDV(IPROP)                          TANK1580
      HSV=.023*RENV**.8*PRNV**.4*CONDV(IPROP)*12./DFLOW(IPROP)          TANK1590
      H2P=(HL+HSV)*.5                                                   TANK1600
      DEFINT=C2*RHOPAN*THIPAN(IPROP)*.5/H2P                             TANK1610
      IF(DEFINT .GE. D) DTIME=D                                         TANK1620
      IF(DEFINT .GE. D) GO TO 150                                       TANK1630
      DELNN=D/DEFINT                                                    TANK1640
      NSTEPS=IFIX(DELNN)                                                TANK1650
      DTIME=D/NSTEPS                                                    TANK1660
  150 DTITOT=DTIME                                                      TANK1670
  160 TEMPLU=TTW                                                        TANK1680
      H2P=(HL+HSV)*.5                                                   TANK1690
      IF(IHPR.EQ.0) GO TO 170                                           TANK1700
      H2P=1./(1./H2P+1./HPR)                                            TANK1710
  170 IFAIL=0                                                           TANK1720
      IF(TLOAD(IPROP) .LT. TSATL(IPROP)) GO TO 180                      TANK1730
      ELHXSL=0.                                                         TANK1740
      ASL=0.                                                            TANK1750
      GO TO 200                                                         TANK1760
  180 IF(IHPR.EQ.0) GO TO 190                                           TANK1770
      HL1=1./(1./HL+1./HPR)                                             TANK1780
  190 ASL=CPL(IPROP)*W5*ALOG((TTW-TLOAD(IPROP))/(TTW-TSATL(IPROP)))/HL1 TANK1790
      ELHXSL=ASL/(3.141593*DFLOW(IPROP)*NTUBE(IPROP))                   TANK1800
      IF(ELHXSL .LT. ELPANL(IPROP)) GO TO 200                           TANK1810
      H1=HLOAD(IPROP)                                                   TANK1820
      GO TO 380                                                         TANK1830
  200 ASV=W5*(HSATV(IPROP)-HSATL(IPROP))/(H2P*(TTW-TSATL(IPROP)))       TANK1840
      ELHXSV=ASV/(3.141593*DFLOW(IPROP)*NTUBE(IPROP))                   TANK1850
      IF((ELHXSL+ELHXSV) .LT. ELPANL(IPROP)) GO TO 230                  TANK1860
      I2P=1                                                             TANK1870
      K=1                                                               TANK1880
      PRESS=PLOAD(IPROP)                                                TANK1890
      CALL PROP3                                                        TANK1900
  210 ENTH2=H2P*(AFLOW-ASL)*(TTW-TSATL(IPROP))/W5+HV-HLV                TANK1910
      QUAL=(ENTH2-HV+HLV)/HLV                                           TANK1920
      H2P=(QUAL*HSV+(1.-QUAL)*HL+HL)*.5                                 TANK1930
      IF(IHPR.EQ.0) GO TO 220                                           TANK1940
      H2P=1./(1./H2P+1./HPR)                                            TANK1950
  220 K=K+1                                                             TANK1960
      IF(K .LT. 6) GO TO 210                                            TANK1970
      H2PDT=H2PDT+ENTH2*DTIME                                           TANK1980
      GO TO 320                                                         TANK1990
  230 ELHXSH=ELPANL(IPROP)-(ELHXSL+ELHXSV)                              TANK2000
      ASH=3.141593*DFLOW(IPROP)*ELHXSH*NTUBE(IPROP)/4.                  TANK2010
      DELSH=.1*ELHXSH                                                   TANK2020
      DELP1=0.                                                          TANK2030
      DELP=0.                                                           TANK2040
      PRESS=PLOAD(IPROP)                                                TANK2050
      HSH1=HSV                                                          TANK2060
      CP1=CPV(IPROP)                                                    TANK2070
      FRICT=.003248-.000515*ALOG(W5/(NTUBE(IPROP)*W))                   TANK2080
      PINLET=PLOAD(IPROP)                                               TANK2090
      TINLET=TSATL(IPROP)                                               TANK2100
      DO 310 NN=1,10                                                    TANK2110
      TEMPLU=TTW                                                        TANK2120
      DO 260 J=1,3                                                      TANK2130
      TEMP=TEMPLU                                                       TANK2140
      CALL PROP2                                                        TANK2150
      RENSH=G*DFLOW(IPROP)/VIS                                          TANK2160
      IF(IPROP.EQ.1.AND.TEMPLU.LE.175.) COND=12.*(5.98E-9*TEMPLU-.37E-7)TANK2170
      PRNSH=VIS*CP/COND                                                 TANK2180
      HSH2=.023*RENSH**.8*PRNSH**.4*COND/DFLOW(IPROP)                   TANK2190
      HSH=(HSH1+HSH2)*.5                                                TANK2200
      IF(IHPR.EQ.0) GO TO 240                                           TANK2210
      HSH=1./(1./HSH+1./HPR)                                            TANK2220
  240 CPAVG=(CP+CP1)*.5                                                 TANK2230
      TF(J)=(TINLET+TTW*(EXP(HSH*ASH/(CPAVG*W5))-1.))/ EXP(HSH*ASH/(CPAVTANK2240
     1G*W5))                                                            TANK2250
      IF(J .GT. 1) GO TO 250                                            TANK2260
      TEMPLU=TF(J)                                                      TANK2270
      GO TO 260                                                         TANK2280
  250 TEMPLU=(TF(J)+TF(J-1))*.5                                         TANK2290
  260 CONTINUE                                                          TANK2300
      HSH1=HSH2                                                         TANK2310
      CP1=CP                                                            TANK2320
      TTOT2=TF(J)                                                       TANK2330
      IF(NN.GT.1) GO TO 270                                             TANK2340
      TEMP=TINLET                                                       TANK2350
      PRESS=PINLET                                                      TANK2360
      CALL PROP2                                                        TANK2370
      GAMMA1=1./(1.-1545./(778.26*CP*W))                                TANK2380
      SONIC1=SQRT(32.174*GAMMA1*1545.*TEMP/W)                           TANK2390
      VEL1=G/RHO                                                        TANK2400
      AMACH1=VEL1/SONIC1                                                TANK2410
  270 PTOT1=PINLET                                                      TANK2420
      TTOT1=TINLET                                                      TANK2430
      DE=TTW/TTOT1+1./(4.*FRICT*DELSH/DFLOW(IPROP))*(TTW/TTOT1-1.)*(EXP TANK2440
     1(-2.*FRICT*DELSH/DFLOW(IPROP))-1.)                                TANK2450
      DO 300 KK=1,3                                                     TANK2460
      IF(KK.EQ.1) BE=1.                                                 TANK2470
      PTOT2=PTOT1*SQRT(1.-GAMMA1*AMACH1*AMACH1*BE*DE*4.*FRICT*DELSH/ DFLTANK2480
     1OW(IPROP))                                                        TANK2490
      HSL=G/(144.*PTOT2)*SQRT(1545.*TTOT2/(GAMMA1*W*32.174))            TANK2500
      JJ=1                                                              TANK2510
      AMACH2(JJ)=0.                                                     TANK2520
  280 RHS(JJ)=AMACH2(JJ)*(1.+.5*(GAMMA1-1.)*AMACH2(JJ)*AMACH2(JJ))** (-.TANK2530
     15*(GAMMA1+1.)/(GAMMA1-1.))                                        TANK2540
      IF(RHS(JJ).GT.HSL) GO TO 290                                      TANK2550
      JJ=JJ+1                                                           TANK2560
      IF(JJ.EQ.20) WRITE(6,390)                                         TANK2570
      IF(JJ.EQ.20) GO TO 300                                            TANK2580
      AMACH2(JJ)=AMACH2(JJ-1)+.05                                       TANK2590
      GO TO 280                                                         TANK2600
  290 BLC=(RHS(JJ)-RHS(JJ-1))/(AMACH2(JJ)-AMACH2(JJ-1))                 TANK2610
      ALC=RHS(JJ)-BLC*AMACH2(JJ)                                        TANK2620
      AM2=(HSL-ALC)/BLC                                                 TANK2630
      BE=.5+.5*PTOT2/PTOT1*PTOT2/PTOT1*TTOT1/TTOT2*AM2/AMACH1*AM2/AMACH1TANK2640
  300 CONTINUE                                                          TANK2650
      DELP=PTOT1-PTOT2                                                  TANK2660
      DELP1=DELP1+DELP                                                  TANK2670
      PS2=PTOT2/((1.+(GAMMA1-1.)*.5*AM2*AM2)**(GAMMA1/(GAMMA1-1.)))     TANK2680
      TS2=TTOT2/(1.+(GAMMA1-1.)*.5*AM2*AM2)                             TANK2690
      TEMP=TS2                                                          TANK2700
      PRESS=PS2                                                         TANK2710
      CALL PROP2                                                        TANK2720
      GAMMA1=1./(1.-1545./(W*778.26*CP))                                TANK2730
      SONIC1=SQRT(GAMMA1*32.174*1545.*TS2/W)                            TANK2740
      VEL1=G/RHO                                                        TANK2750
      AMACH1=VEL1/SONIC1                                                TANK2760
      PINLET=PTOT2                                                      TANK2770
      TINLET=TF(J)                                                      TANK2780
  310 CONTINUE                                                          TANK2790
      PHEX(IPROP)=PS2                                                   TANK2800
      DELPX(IPROP)=DELP1                                                TANK2810
      TFHX(IPROP)=TF(J)                                                 TANK2820
      TEMP=TF(J)                                                        TANK2830
      CALL PROP                                                         TANK2840
      HEXI=H2                                                           TANK2850
      H2PDT=H2PDT+HEXI*DTIME                                            TANK2860
  320 IF(DTITOT.GE.(D-1.E-8)) GO TO 330                                 TANK2870
      IFAIL=1                                                           TANK2880
      DTITOT=DTITOT+DTIME                                               TANK2890
  330 QR=.1714E-8*.67*A*(T0**4-TTW**4)/3600.                            TANK2900
      IF(IHEAT.EQ.0.AND.QR.GT.0.) IHEAT=1                               TANK2910
      TEMP=TEMPLU                                                       TANK2920
      CALL PROP                                                         TANK2930
      QEX=W5*(H2-HLOAD(IPROP))                                          TANK2940
      QLIQ=QOA(IPROP)*ALSA/3600.                                        TANK2950
      TEMP=TGAS                                                         TANK2960
      PRESS=PGAS                                                        TANK2970
      CALL CONVEC                                                       TANK2980
      Q=HCONV*A*(TTW-TGAS)/3600.                                        TANK2990
      IF(IPROP .EQ. 1) GO TO 350                                        TANK3000
      TTW=TTW+(QR-Q-QEX-QLIQ-QDTVO2)*DTIME/(C2*WTANK)                   TANK3010
      IF(IHEAT.EQ.0.AND.TTW.GT.TSS3) GO TO 340                          TANK3020
      IF(TTW .GT. TSS3) TTW=TSS3                                        TANK3030
  340 IF(IFAIL.EQ.1) GO TO 160                                          TANK3040
      GO TO 370                                                         TANK3050
  350 TINS2=TTW-3600.*Q*THKIN/(CONDIN*A)                                TANK3060
      TTW=TTW+(QR-Q-QEX-QLIQ)*DTIME/(C2*WTANK+CPINS*WINS*.5)-CPINS*WINS TANK3070
     1*(TINS2-TINS1)/(2.*C2*WTANK+CPINS*WINS)                           TANK3080
      IF(IHEAT.EQ.0.AND.TTW.GT.TSS3) GO TO 360                          TANK3090
      IF(TTW .GT. TSS3) TTW=TSS3                                        TANK3100
  360 IF(IFAIL.EQ.1) GO TO 160                                          TANK3110
  370 H1=H2PDT/DTITOT                                                   TANK3120
  380 RETURN                                                            TANK3130
  390 FORMAT(38H HEAT EXCHANGER PROPELLANT FLOW CHOKES)                 TANK3140
      END                                                                      -
      SUBROUTINE COMPAR                                                 COMP1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  COMP1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUCOMP1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOCOMP1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WCOMP1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RCOMP1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       COMP1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDCOMP1070
     1IN                                                                COMP1080
      COMMON/LIST5/WO2D,WH2D,PC,TH2IN,TO2IN,PH2IN,PO2IN,CD,TH2,TO2,PH2, COMP1090
     1PO2,WH2,WO2,OF,WTOTAL,THRUST,SI,CSTAR,J,PCD,EPS,THRUSN,NENG(100)  COMP1100
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), COMP1110
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RACOMP1120
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXCOMP1130
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     COMP1140
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVCOMP1150
     1,CVBARL,UBARV,UBARL,VLV                                           COMP1160
      COMMON/LIST8/ELPANL(2),THIPAN(2),DFLOW(2),PLOAD(2),TLOA D(2),HLOADCOMP1170
     1(2),VISL(2),CONDL(2),CPL(2),TSATL(2), HSATL(2),HSATV(2),VISV(2),COCOMP1180
     2NDV(2),CPV(2),TF(20), NTUBE(2),PGAS,TGAS,TTWALL,TUBESP(2),TDIFF,TACOMP1190
     3U(100),PHEX(2) ,ITERPP,TFHX(2),IHEAT,CONSTK,SUMVAP,WVAPO1,JK,DELPXCOMP1200
     4(2)                                                               COMP1210
      COMMON/LIST9/TIMFLV,PVAPNW,PVAPSV,TVAPNW,TVAPSV,ITESTR, EMTOT,EMTOCOMP1220
     1TN,EMVENT,ISW,VTANK,DTANK,QDTLO2,HVAPOR,TOTVAP,IC1,I1P,ZKK,QDTVO2 COMP1230
     2,PDIFF                                                            COMP1240
      LTEST=0                                                           COMP1250
      PTEST=P                                                           COMP1260
      PTEST1=P+PDIFF                                                    COMP1270
      WW1=P*V*W*144./(1545.*T)                                          COMP1280
      IF(ICONT1.EQ.0.AND.W6.GT..1)LTEST=1                               COMP1290
      IF(PVAPSV.LT.PTEST)KTEST=0                                        COMP1300
      IF(PVAPSV.LT.PTEST) GO TO 100                                     COMP1310
      IF(LTEST.EQ.1) KTEST=2                                            COMP1320
      IF(LTEST.EQ.1) GO TO 100                                          COMP1330
      KTEST=2                                                           COMP1340
      IF(PVAPSV.LT.PTEST1) KTEST=0                                      COMP1350
      IF(ITESTR.EQ.0) GO TO 100                                         COMP1360
      IF(IMODE.LE.2.AND.LTEST.NE.1) KTEST=2                             COMP1370
  100 TIMFLO=D                                                          COMP1380
      ISW=ISW3=ITESTR=0                                                 COMP1390
      TIMFLS=TIMFLO                                                     COMP1400
      TVAP=TVAPSV                                                       COMP1410
      PVAP=PVAPSV                                                       COMP1420
      PVAPNW=PVAP                                                       COMP1430
      PVAPSS=PVAPSV                                                     COMP1440
      TVAPNW=TVAP                                                       COMP1450
      EMTOT1=EMTOT                                                      COMP1460
      PP1=P                                                             COMP1470
      TT1=T                                                             COMP1480
      CONST=1.                                                          COMP1490
      DTEMP=DTEMP1=EMVENT=TOTVAP=HBART=TIMFL=TIMFLV=WVAPO1=0.           COMP1500
      PRESS=PVAP                                                        COMP1510
      TEMP=TVAP                                                         COMP1520
      TEMP=TVAP                                                         COMP1520
      CALL PROP3                                                        COMP1530
  110 KTIME1=0                                                          COMP1540
      TIMFL1=TIMFLO                                                     COMP1550
      PVAPSS=PVAP                                                       COMP1560
      TIMULT=1.                                                         COMP1570
  120 KTIME2=0                                                          COMP1580
      IF(KTEST.EQ.0) GO TO 170                                          COMP1590
      TIMFL1=TIMFLO/(20.*TIMULT)                                        COMP1600
  130 KTIME3=0                                                          COMP1610
  140 TEMP=TVAP                                                         COMP1620
      PRESS=PVAP                                                        COMP1630
      IF(X.GE.1.) GO TO 150                                             COMP1640
      CALL PROP3                                                        COMP1650
      GAM=1545./(778.26*32.*CVBARV)+1.                                  COMP1660
      GO TO 160                                                         COMP1670
  150 CALL PROP                                                         COMP1680
      GAM=1545./(778.26*32.*C1)+1.                                      COMP1690
  160 WVAPOR=CONSTK*PVAP/SQRT(TVAP)*(PP1/PVAP)**(1./GAM)*SQRT(64.348*W/ COMP1700
     11545.*(GAM/(GAM-1.))*(1.-(PP1/PVAP)**((GAM-1.)/GAM)))             COMP1710
      IF(KTIME3.NE.0)TOTVAP=TOTVAP+WVAPOR*TIMFL1                        COMP1720
      IF(KTIME3.NE.0) TIMFL=TIMFL+TIMFL1                                COMP1730
      IF(KTIME3.NE.0) TIMFLV=TIMFLV+TIMFL1                              COMP1740
  170 IF(KTEST.LT.2) WVAPOR=0.                                          COMP1750
      IF(KTIME1.EQ.0) GO TO 180                                         COMP1760
      TEMP=(TVAP+TVAPNW)*.5                                             COMP1770
      IF(X.LT.1.) PRESS=EXP(12.068408-1521.9884/TEMP)                   COMP1780
      IF(X.GE.(1.-1.E-8)) PRESS=PVAP                                    COMP1790
      IF(KTEST.EQ.2) TEMP=TVAP                                          COMP1800
      CALL PROP3                                                        COMP1810
  180 ISW2=0                                                            COMP1820
      EMBAR=EMTOT1-WVAPOR*TIMFL1*.5                                     COMP1830
      IF(EMBAR.LE.0.) EMBAR=.01                                         COMP1840
      IF(ISW.EQ.1) TEMP=TVAP                                            COMP1850
      IF(ISW.EQ.1) PRESS=PVAP                                           COMP1860
      IF(ISW.EQ.1) CALL PROP3                                           COMP1870
      ISW=0                                                             COMP1880
      ISWSH=0                                                           COMP1890
      IF(KTEST.EQ.0.AND.KTIME1.GT.0) GO TO 190                          COMP1900
      X=(VTANK/EMBAR-VL)/VLV                                            COMP1910
      IF(X.GT.1.) X=1.                                                  COMP1920
      IF(I1P.EQ.1) X=1.                                                 COMP1930
  190 EMVAP=X*EMBAR                                                     COMP1940
      EMLIQ=(1.-X)*EMBAR                                                COMP1950
      YLIQ=(1.5*EMLIQ*VL/3.14159)**.333                                 COMP1960
      IF(ITANK.EQ.1) YLIQ=(3.*EMLIQ*VL/3.14159)**.333                   COMP1970
      ASLIQ=2.*3.14159*DTANK*YLIQ                                       COMP1980
      IF(ITANK.EQ.1) ASLIQ=3.14159*DTANK*YLIQ                           COMP1990
      CONDD=.156E-5                                                     COMP2000
      VISS=.514E-5                                                      COMP2010
      CPP=.23                                                           COMP2020
      IF(J.EQ.1) ACC=THRUSN*NENG(N)*32.174/WTVEH                        COMP2030
      IF(J.GT.1) ACC=THRUST*NENG(N)*32.174/WTVEH                        COMP2040
      IF(W2.EQ.0.) ACC=0.                                               COMP2050
      IF(ACC.GT.0.) GO TO 200                                           COMP2060
      CONDD=CONDD*3600.                                                 COMP2070
      HCONVV=CONDD/XXX                                                  COMP2080
      GO TO 230                                                         COMP2090
  200 HCC=DTANK                                                         COMP2100
      RHOO=1./(VL+VLV)                                                  COMP2110
      TEMP=TVAP                                                         COMP2120
      IF(KTIME1.GT.0.AND.KTEST.NE.2) TEMP=(TVAP+TVAPNW)*.5              COMP2130
      GRNO=HCC*HCC*HCC*RHOO*RHOO*ABS(T3-TEMP)*ACC/(VISS*VISS*TEMP)      COMP2140
      GRPR=GRNO*CPP*VISS/CONDD                                          COMP2150
      CONDD=CONDD*3600.                                                 COMP2160
      IF(GRNO.LT.1.E9) GO TO 210                                        COMP2170
      COEF=.13                                                          COMP2180
      EXPP=.33                                                          COMP2190
      GO TO 220                                                         COMP2200
  210 COEF=.555                                                         COMP2210
      EXPP=.25                                                          COMP2220
  220 HCONVV=COEF*(CONDD/HCC)*(GRPR**EXPP)                              COMP2230
      HCONVA=CONDD/XXX                                                  COMP2240
      IF(HCONVA.GT.HCONVV) HCONVV=HCONVA                                COMP2250
  230 HH3=HCONVV                                                        COMP2260
      AAA=2.*3.14159*DTANK*HCC+3.14159*DTANK*DTANK                      COMP2270
      IF(ITANK.EQ.1) AAA=3.14159*DTANK*HCC+3.14159*DTANK*DTANK*.5       COMP2280
      QDTVO2=HH3*AAA*(T3-TEMP)/3600.                                    COMP2290
      X=(VTANK/EMBAR-VL)/VLV                                            COMP2300
      ISWSH=0                                                           COMP2310
      IF(I1P.EQ.1) X=1.01                                               COMP2320
      IF(X.GE.1.) ISWSH=1                                               COMP2330
      IF(X.GT.1.) X=1.                                                  COMP2340
      IF(KTEST.EQ.2) ZKK=X                                              COMP2350
      IF(ISWSH.EQ.1) GO TO 250                                          COMP2360
      CVBAR=X*CVBARV+(1.-X)*CVBARL                                      COMP2370
      UBAR=X*UBARV+(1.-X)*UBARL                                         COMP2380
      HBAR=HV                                                           COMP2390
      GO TO 260                                                         COMP2400
  250 CALL PROP                                                         COMP2410
      CVBAR=C1                                                          COMP2420
      HBAR=H2                                                           COMP2430
      UBAR=U2                                                           COMP2440
  260 DTEMP=(((QDTLO2*ASLIQ)/3600.+QDTVO2-WVAPOR*(HBAR-UBAR))/(EMBAR* CVCOMP2450
     1BAR))*TIMFL1                                                      COMP2460
      TVAPNW=TVAP+DTEMP                                                 COMP2470
      IF(TVAPNW.LT..01) TVAPNW=.1                                       COMP2480
      IF(KTIME3.EQ.0) TVAPP=TVAP                                        COMP2490
      IF(KTIME3.EQ.0) PVAPP=PVAP                                        COMP2500
      IF(KTIME3.EQ.0) PP11=PP1                                          COMP2510
      IF(KTIME3.EQ.0) TT11=TT1                                          COMP2520
      IF(KTEST.EQ.2.AND.KTIME3.EQ.1) TVAPNW=TVAPP+DTEMP                 COMP2530
      IF(KTEST.EQ.0) KTIME1=KTIME1+1                                    COMP2540
      IF(KTEST.EQ.2) GO TO 270                                          COMP2550
      IF(KTIME1.GT.1) GO TO 270                                         COMP2560
      IF((ABS(1.-TVAPNW/TEMP)).GT..01) GO TO 170                        COMP2570
  270 EMTOTN=EMTOT1-WVAPOR*TIMFL1                                       COMP2580
      PVAPNW=EXP(12.068408-1521.9884/TVAPNW)                            COMP2590
      IF(ISWSH.EQ.1.OR.I1P.EQ.1)PVAPNW=((EMTOT1-WVAPOR*TIMFL1)*1545.*TVACOMP2600
     1PNW)/(W*144.*VTANK)                                               COMP2610
      IF(PVAPNW.LT.0.) PVAPNW=.01                                       COMP2620
      IF(KTEST.EQ.0) GO TO 340                                          COMP2630
      DPVAP=PVAPP-PVAPNW                                                COMP2640
      TVAP=(TVAPNW+TVAP)*.5                                             COMP2650
      IF(X.LT.1.) PVAP=EXP(12.068408-1521.9884/TVAP)                    COMP2660
      IF(X.GE.(1.-1.E-8)) PVAP=(PVAPNW+PVAP)*.5                         COMP2670
      TEMP=TT1                                                          COMP2680
      CALL PROP                                                         COMP2690
      DTEMPT=((Q+W5*H1-W6*H2-(WVAPOR+W5-W6)*U2+WVAPOR*HBAR)/((WW1+(WVAPOCOMP2700
     1R+W5-W6)*TIMFL1*.5)*C1))*TIMFL1                                   COMP2710
      TTN=TT11+DTEMPT                                                   COMP2720
      PPN=1545.*(WW1+(WVAPOR+W5-W6)*TIMFL1)*TTN/(V*W*144.)              COMP2730
      DPTANK=PP11-PPN                                                   COMP2740
      TT1=(TTN+TT1)*.5                                                  COMP2750
      PP1=(PPN+PP1)*.5                                                  COMP2760
      IF(KTIME2.GE.1) GO TO 280                                         COMP2770
      IF(KTIME3.EQ.0.AND.PVAPNW.LT.(PPN+.3*(PVAPP-PP11))) ISW2=1        COMP2780
      IF(ISW2.EQ.0) GO TO 280                                           COMP2790
      TVAP=TVAPP                                                        COMP2800
      PVAP=PVAPP                                                        COMP2810
      PP1=PP11                                                          COMP2820
      TT1=TT11                                                          COMP2830
      TIMULT=TIMULT*2.                                                  COMP2840
      GO TO 120                                                         COMP2850
  280 IF(PVAPNW.LT.PPN.AND.KTIME3.EQ.0) GO TO 290                       COMP2860
      KTIME3=KTIME3+1                                                   COMP2870
      IF(KTIME3.LT.2) GO TO 140                                         COMP2880
      TVAP=TVAPNW                                                       COMP2890
      PVAP=PVAPNW                                                       COMP2900
      TT1=TTN                                                           COMP2910
      PP1=PPN                                                           COMP2920
      EMTOT1=EMTOTN                                                     COMP2930
      WW1=WW1+(WVAPOR+W5-W6)*TIMFL1                                     COMP2940
      IF(KTIME3.NE.0)HBART=HBART+HBAR*TIMFL1                            COMP2950
      KTIME2=KTIME2+1                                                   COMP2960
      ISW3=0                                                            COMP2970
      ZKK=X                                                             COMP2980
      IF(PVAP.GT.PP1.AND.ABS(1.-(PVAP/PP1)).LT..005) GO TO 320          COMP2990
      IF(PVAP.LT.PP1) GO TO 290                                         COMP3000
      IF(KTIME2.LT.(20*IFIX(TIMULT))) GO TO 130                         COMP3010
      GO TO 330                                                         COMP3020
  290 XCON2=(PPN-PVAPNW)/(PVAPP-PP11)                                   COMP3030
      CONST2=XCON2/(XCON2+1.)                                           COMP3040
      CONST3=CONST2                                                     COMP3050
      TIMFLR=TIMFL1*CONST2                                              COMP3060
      TIMFL1=TIMFL1*(1.-CONST2)                                         COMP3070
      IF(KTIME3.EQ.0) TIMFLR=0.                                         COMP3080
      IF(KTIME3.GE.1) TIMFL1=0.                                         COMP3090
      TIMFL=TIMFL+TIMFL1-TIMFLR                                         COMP3100
      TIMFLV=TIMFLV+TIMFL1-TIMFLR                                       COMP3110
      TOTVAP=TOTVAP+WVAPOR*(TIMFL1-TIMFLR)                              COMP3120
      HBART=HBART+HBAR*(TIMFL1-TIMFLR)                                  COMP3130
      IF(KTIME3.GE.1) GO TO 300                                         COMP3140
      PVAPNW=PVAPP-(1.-CONST2)*DPVAP                                    COMP3150
      TVAPNW=TVAPP+(1.-CONST2)*DTEMP                                    COMP3160
      PP1=PP11-(1.-CONST2)*DPTANK                                       COMP3170
      TT1=TT11+(1.-CONST2)*DTEMPT                                       COMP3180
      GO TO 310                                                         COMP3190
  300 PVAPNW=PVAPNW+CONST2*DPVAP                                        COMP3200
      TVAPNW=TVAPNW-CONST2*DTEMP                                        COMP3210
      PP1=PP1+CONST2*DPTANK                                             COMP3220
      TT1=TT1-CONST2*DTEMPT                                             COMP3230
  310 EMTOTN=EMTOTN+WVAPOR*(TIMFL1-TIMFLR)                              COMP3240
      WW1=WW1+(WVAPOR+W5-W6)*(TIMFL1-TIMFLR)                            COMP3250
  320 ISW3=1                                                            COMP3260
      PVAP=PVAPNW                                                       COMP3270
      TVAP=TVAPNW                                                       COMP3280
      TIMFLO=TIMFLS-TIMFL                                               COMP3290
      KTEST=0                                                           COMP3300
  330 WVAPO1=TOTVAP/TIMFLS                                              COMP3310
      HVAPOR=HBART/TIMFLV                                               COMP3320
      IF(IC1.EQ.2.AND.ZKK.GE.(1.-1.E-8)) I1P=1                          COMP3330
      IF(ISW3.EQ.1) GO TO 110                                           COMP3340
      ITESTR=0                                                          COMP3350
      IF(PVAPNW.GT.PPN+.1*(PVAPP-PP11)) ITESTR=1                        COMP3360
      GO TO 350                                                         COMP3370
  340 IF(PVAPNW.LT.PTEST1) GO TO 350                                    COMP3380
      ISW=1                                                             COMP3390
      CONST=(PVAPNW-PTEST1)/(PVAPNW-PVAPSS)                             COMP3400
      TIMFL=TIMFL+TIMFLO*(1.-CONST)                                     COMP3410
      TIMFLO=TIMFLO*CONST                                               COMP3420
      KTEST=2                                                           COMP3430
      PVAP=PTEST1                                                       COMP3440
      PVAPNW=PTEST1                                                     COMP3450
      TVAPNW=TVAPSV+(1.-CONST)*DTEMP                                    COMP3460
      IF(I1P.EQ.0) TVAPNW=1521.9884/(12.068408-ALOG(PVAPNW))            COMP3470
      TVAP=TVAPNW                                                       COMP3480
      GO TO 110                                                         COMP3490
  350 EMTOTN=EMTOT-TOTVAP                                               COMP3500
      IF(IC1.EQ.2.AND.ZKK.GE.(1.-1.E-8)) I1P=1                          COMP3510
      RETURN                                                            COMP3520
      END                                                                      -
      SUBROUTINE CONVEC                                                 CONV1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  CONV1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUCONV1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOCONV1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WCONV1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RCONV1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       CONV1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDCONV1070
     1IN                                                                CONV1080
      COMMON/LIST5/WO2D,WH2D,PC,TH2IN,TO2IN,PH2IN,PO2IN,CD,TH2,TO2,PH2, CONV1090
     1PO2,WH2,WO2,OF,WTOTAL,THRUST,SI,CSTAR,J,PCD,EPS,THRUSN,NENG(100)  CONV1100
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), CONV1110
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RACONV1120
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXCONV1130
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     CONV1140
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVCONV1150
     1,CVBARL,UBARV,UBARL,VLV                                           CONV1160
      IF(J.EQ.1) ACC=THRUSN*NENG(N)*32.174/WTVEH                        CONV1170
      IF(J.GT.1) ACC=THRUST*NENG(N)*32.174/WTVEH                        CONV1180
      IF(W2.EQ.0.) ACC=0.                                               CONV1190
      IF(ACC.GT.0.) GO TO 100                                           CONV1200
      CALL PROP2                                                        CONV1210
      COND=COND*3600.                                                   CONV1220
      IF(IPROP.EQ.1) HCONV=1./(THKIN/CONDIN+XXX/COND)                   CONV1230
      IF(IPROP.EQ.2) HCONV=COND/XXX                                     CONV1240
      GO TO 130                                                         CONV1250
  100 HC=2.*V/(3.14159*DIA*DIA)                                         CONV1260
      IF(ITANK.EQ.1) HC=4.*V/(3.14159*DIA*DIA)                          CONV1270
      CALL PROP2                                                        CONV1280
      GRNO=(HC*HC*HC)*(RHO*RHO)*ABS(T3-T)*ACC/(VIS*VIS*T)               CONV1290
      IF(GRNO .LE. 0.) GRNO=1.                                          CONV1300
      GRPR=GRNO*CP*VIS/COND                                             CONV1310
      IF(GRPR .LE. 0.) GRPR=1.                                          CONV1320
      COND=COND*3600.                                                   CONV1330
      IF(GRNO .LT. 1.E9) GO TO 110                                      CONV1340
      COEF=.13                                                          CONV1350
      EXP=.33                                                           CONV1360
      GO TO 120                                                         CONV1370
  110 COEF=.555                                                         CONV1380
      EXP=.25                                                           CONV1390
  120 HCONV=COEF*(COND/HC)*(GRPR**EXP)                                  CONV1400
      IF(IPROP .EQ. 1) HCONV=1./(THKIN/CONDIN+1./HCONV)                 CONV1410
      HCONV1=COND/XXX                                                   CONV1420
      IF(IPROP .EQ. 1) HCONV1=1./(THKIN/CONDIN+XXX/COND)                CONV1430
      IF(HCONV1 .GT. HCONV) HCONV=HCONV1                                CONV1440
  130 RETURN                                                            CONV1450
      END                                                                      -
      SUBROUTINE AREA                                                   AREA1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  AREA1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUAREA1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOAREA1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WAREA1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RAREA1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       AREA1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDAREA1070
     1IN                                                                AREA1080
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVAREA1090
     1,CVBARL,UBARV,UBARL,VLV                                           AREA1100
      IF(IPROP .EQ. 2) GO TO 140                                        AREA1110
      IF(WLR(1) .LE. 0.) GO TO 150                                      AREA1120
      PP=-1.5*DIA                                                       AREA1130
      RR=1.5*WLR(1)*VL/3.141593                                         AREA1140
      IF(ITANK .EQ. 1) RR=3.*WLR(1)*VL/3.141593                         AREA1150
      AA=-PP*PP/3.                                                      AREA1160
      BB=(2.*PP*PP*PP+27.*RR)/27.                                       AREA1170
      SS=BB*BB*.25+AA*AA*AA/27.                                         AREA1180
      IF(SS .GE. 0.) GO TO 100                                          AREA1190
      COSPHI=(-BB*.5)/SQRT(-AA*AA*AA/27.)                               AREA1200
      PHI=ACOS(COSPHI)/3.                                               AREA1210
      PHI=PHI+240.*3.141593/180.-3.141593                               AREA1220
      COSPHI=-COS(PHI)                                                  AREA1230
      XX3=2.*SQRT(-AA/3.)*COSPHI                                        AREA1240
      HH=XX3-PP/3.                                                      AREA1250
      GO TO 110                                                         AREA1260
  100 CCC=-BB*.5+SQRT(SS)                                               AREA1270
      IF(CCC.LT.0.)AAA=-CCC**.333333                                    AREA1280
      IF(CCC.GT.0.) AAA=CCC**.333333                                    AREA1290
      DDD=-BB*.5-SQRT(SS)                                               AREA1300
      IF(DDD.LT.0.) BBB=-DDD**.333333                                   AREA1310
      IF(DDD.GT.0.) BBB=DDD**.333333                                    AREA1320
      XX3=AAA+BBB                                                       AREA1330
      HH=XX3-PP/3.                                                      AREA1340
  110 WWSET=3.141593*DIA*HH/(A*.5)                                      AREA1350
      IF(ITANK .EQ. 1) WWSET=3.141593*DIA*HH/A                          AREA1360
      G=W2*SIN/WTVEH                                                    AREA1370
      BETA=1.69724-27054.8*G-3.88896E9*G**2+4.46074E13*G**3-4.06928E16*GAREA1380
     1**4                                                               AREA1390
      IF(G.LE.1.E-3) GO TO 120                                          AREA1400
      IF(BETA.GT..225)BETA=SQRT(WWSET)                                  AREA1410
  120 IF(G.GE.1.E-8) GO TO 130                                          AREA1420
      IF(BETA.LT.1.69697)BETA=1./SQRT(WWSET)                            AREA1430
  130 IF(BETA.LT.SQRT(WWSET))BETA=SQRT(WWSET)                           AREA1440
      IF(BETA.GT.1./SQRT(WWSET))BETA=1./SQRT(WWSET)                     AREA1450
      ALSA=BETA*SQRT(WWSET)*A                                           AREA1460
      IF(ALSA.GT.A) ALSA=A                                              AREA1470
      IF(ALSA.LT.0.) ALSA=0.                                            AREA1480
      GO TO 150                                                         AREA1490
  140 IF(WLR(2) .LE. 0.) GO TO 150                                      AREA1500
      AMENIS=HMENIS*2.*3.141593*DIA                                     AREA1510
      IF(ITANK.EQ.1) AMENIS=HMENIS*3.141593*DIA                         AREA1520
      ALSA=2.*3.141593*DIA*(3.*WLR(2)*VL/(2.*3.141593))**.33333 +AMENIS AREA1530
      IF(ITANK.EQ.1) ALSA=3.141593*DIA*(3.*WLR(2)*VL/3.141593)** .333333AREA1540
     1+AMENIS                                                           AREA1550
  150 IF(WLR(IPROP).EQ.0.) ALSA=0.                                      AREA1560
      RETURN                                                            AREA1570
      END                                                                      -
      SUBROUTINE RGIRIS                                                 RGIR1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  RGIR1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SURGIR1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TORGIR1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WRGIR1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RRGIR1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       RGIR1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDRGIR1070
     1IN                                                                RGIR1080
      COMMON/LIST4/DLINE(2,2,3),XLINE(2,2,3),PINJ,FLOW,ICM(100)         RGIR1090
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), RGIR1100
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RARGIR1110
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXRGIR1120
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     RGIR1130
      COMMON/LIST10/WENG(2),TV(2)                                       RGIR1140
      DIMENSION CON1(2),CON2(2),CON3(2)                                 RGIR1150
      DATA CON1(1),CON2(1),CON3(1)/-.454178,.494258,.011207/, CON1(2),CORGIR1160
     1N2(2),CON3(2)/-1.56954,1.49336,.284344/                           RGIR1170
      IF(ICM(N).EQ.1) ICMT=1                                            RGIR1180
      IF(ICM(N).EQ.2) ICMT=2                                            RGIR1190
      IF(ICM(N).EQ.3) ICMT=3                                            RGIR1200
      ALINMX(IPROP)=3.14159*DLINE(1,IPROP,ICMT)**2*36.                  RGIR1210
      RGAS=1545./W                                                      RGIR1220
      GAM=RGAS/(778.26*C1)+1.                                           RGIR1230
      IF(IREG.EQ.1) GO TO 100                                           RGIR1240
      IF(ICONT1.EQ.2.AND.ICONT2.NE.3) GO TO 150                         RGIR1250
  100 PRP(IPROP)=PRP(IPROP)/PV(IPROP)                                   RGIR1260
      IF(PRP(IPROP).GT.1.) GO TO 150                                    RGIR1270
      CDIRIS=.7                                                         RGIR1280
      DTERMA=SQRT(64.348*GAM/(RGAS*(GAM-1.)))                           RGIR1290
      ETERMA=PRP(IPROP)**(1./GAM)*SQRT(1.-PRP(IPROP)**((GAM-1.)/GAM))   RGIR1300
      TERMA=WENG(IPROP)*SQRT(TV(IPROP))/(PV(IPROP)*DTERMA*ETERMA)       RGIR1310
      NM=1                                                              RGIR1320
  110 ACS(IPROP,NM)=TERMA/CDIRIS                                        RGIR1330
      IF(NM.GE.11) GO TO 140                                            RGIR1340
      RECD=2.*WENG(IPROP)/(VIS/12.*SQRT(3.14159*ACS(IPROP,NM)))         RGIR1350
      IF(RECD.GT.100.) GO TO 120                                        RGIR1360
      CDIRIS=3.25483E-02+RECD*(.110336+RECD*(-7.96317E-03+RECD*(7.6089E-RGIR1370
     105-RECD*6.82355E-08)))                                            RGIR1380
      GO TO 130                                                         RGIR1390
  120 CDIRIS=.7                                                         RGIR1400
      IF(RECD.GT.3.E3) CDIRIS=.65                                       RGIR1410
      IF(RECD.GT.3.E4) CDIRIS=.6                                        RGIR1420
  130 NM=NM+1                                                           RGIR1430
      IF(NM.EQ.2) GO TO 110                                             RGIR1440
      IF((ABS(ACS(IPROP,NM-2)-ACS(IPROP,NM-1))/ACS(IPROP,NM-1)).GT..01) RGIR1450
     1GO TO 110                                                         RGIR1460
  140 CDIR(IPROP)=CDIRIS                                                RGIR1470
      AIRIS(IPROP)=ACS(IPROP,NM-1)                                      RGIR1480
      IF(AIRIS(IPROP).LT.ALINMX(IPROP)) GO TO 180                       RGIR1490
      AIRIS(IPROP)=ALINMX(IPROP)                                        RGIR1500
      GO TO 180                                                         RGIR1510
  150 IF(AIRIS(IPROP).GE.ALINMX(IPROP)) GO TO 170                       RGIR1520
      IF(IPROP.EQ.1) AIRIS(IPROP)=ALINMX(IPROP)                         RGIR1530
      IF(IPROP.EQ.1) GO TO 170                                          RGIR1540
      BETAC=CDIR(IPROP)*AIRIS(IPROP)*PV(IPROP)/SQRT(TV(IPROP))          RGIR1550
      TERMS=CON2(IPROP)**2-4.*CON1(IPROP)*(CON3(IPROP)-WENG(IPROP)/ BETARGIR1560
     1C)                                                                RGIR1570
      IF(TERMS.GE.0.) GO TO 160                                         RGIR1580
      PRP(2)=(2./(GAM+1.))**(GAM/(GAM-1.))                              RGIR1590
      PV(2)=PRP(2)*PV(2)                                                RGIR1600
      WENG(2)=.65*AIRIS(2)*PV(2)/SQRT(TV(2))*SQRT(32.174*GAM*W/1545.*(2.RGIR1610
     1/(GAM+1.))**((GAM+1.)/(GAM-1.)))                                  RGIR1620
      GO TO 180                                                         RGIR1630
  160 PRP(IPROP)=(-CON2(IPROP)-SQRT(CON2(IPROP)**2-4.*CON1(IPROP)*(CON3(RGIR1640
     1IPROP)-WENG(IPROP)/BETAC)))/(2.*CON1(IPROP))                      RGIR1650
      IF(PRP(IPROP).LT.(2./(GAM+1.))**(GAM/(GAM-1.))) WENG(IPROP)=.65* ARGIR1660
     1IRIS(IPROP)*PV(IPROP)/SQRT(TV(IPROP))*SQRT(32.174*GAM*W/1545.*(2./RGIR1670
     2(GAM+1.))**((GAM+1.)/(GAM-1.)))                                   RGIR1680
      IF(PRP(IPROP).LT.(2./(GAM+1.))**(GAM/(GAM-1.))) PRP(IPROP)=(2./( GRGIR1690
     1AM+1.))**(GAM/(GAM-1.))                                           RGIR1700
      IF(PRP(IPROP).GE.1.) PRP(IPROP)=1.                                RGIR1710
      PV(IPROP)=PRP(IPROP)*PV(IPROP)                                    RGIR1720
      GO TO 180                                                         RGIR1730
  170 PRP(IPROP)=1.                                                     RGIR1740
  180 RETURN                                                            RGIR1750
      END                                                                      -
      SUBROUTINE PBAL                                                   PBAL1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  PBAL1010
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDPBAL1020
     1IN                                                                PBAL1030
      COMMON/LIST4/DLINE(2,2,3),XLINE(2,2,3),PINJ,FLOW,ICM(100)         PBAL1040
      COMMON/LIST6/P2,P1,P5,WM(2),HP(2),PR(2),PU(2),PL(2),PI(2),VOL(2), PBAL1050
     1TI(2),WT(2),TTI(2),AS(2),DIAT(2),XXT(2),WDOT(2,100),RATRE(2), N,RAPBAL1060
     2TIO,IMODE,ACS(2,20),PRP(2),PV(2),TEMPV(2),CDIR(2) ,AIRIS(2),ALINMXPBAL1070
     3(2),DW(2),ICONT2,RPTS(2),IREG                                     PBAL1080
      IF(IPROP .EQ. 1) WL=2.016                                         PBAL1090
      IF(IPROP .EQ. 2) WL=32.                                           PBAL1100
      IF(ICM(N).EQ.1) ICMT=1                                            PBAL1110
      IF(ICM(N).EQ.2) ICMT=2                                            PBAL1120
      IF(ICM(N).EQ.3) ICMT=3                                            PBAL1130
      F=.003248-.000515*ALOG(FLOW/WL)                                   PBAL1140
      DPF1=.00753*FLOW*FLOW*TEMP*XLINE(1,IPROP,ICMT)*F/(PRESS*WL*DLINE(1PBAL1150
     1,IPROP,ICMT)**5)                                                  PBAL1160
      PBAR=PRESS-.5*DPF1                                                PBAL1170
      DPF1=.00753*FLOW*FLOW*TEMP*XLINE(1,IPROP,ICMT)*F/(PBAR*WL*DLINE(1,PBAL1180
     1IPROP,ICMT)**5)                                                   PBAL1190
      PBAR=PRESS-DPF1                                                   PBAL1200
      F=.003248-.000515*ALOG(FLOW*.5/WL)                                PBAL1210
      DPF2=.00753*FLOW*FLOW*.25*TEMP*XLINE(2,IPROP,ICMT)*F/(PBAR*WL* DLIPBAL1220
     1NE(2,IPROP,ICMT)**5)                                              PBAL1230
      PBAR=PBAR-DPF2*.5                                                 PBAL1240
      DPF2=.00753*FLOW*FLOW*.25*TEMP*XLINE(2,IPROP,ICMT)*F/(PBAR*WL* DLIPBAL1250
     1NE(2,IPROP,ICMT)**5)                                              PBAL1260
      PINJ=PRESS-DPF1-DPF2                                              PBAL1270
      RETURN                                                            PBAL1280
      END                                                                      -
      SUBROUTINE MIXRAT                                                 MIXR1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  MIXR1010
      COMMON/LIST5/WO2D,WH2D,PC,TH2IN,TO2IN,PH2IN,PO2IN,CD,TH2,TO2,PH2, MIXR1020
     1PO2,WH2,WO2,OF,WTOTAL,THRUST,SI,CSTAR,J,PCD,EPS,THRUSN,NENG(100)  MIXR1030
      DIMENSION PCH(100),DELT(100)                                      MIXR1040
      IF(J.GT.1) GO TO 100                                              MIXR1050
      OF=WO2D/WH2D                                                      MIXR1060
      TTH2=TH2                                                          MIXR1070
      TTO2=TO2                                                          MIXR1080
      TH2=TH2IN                                                         MIXR1090
      TO2=TO2IN                                                         MIXR1100
      CALL PERFOR                                                       MIXR1110
      THRUST=(WO2D+WH2D)*SI                                             MIXR1120
      ATROAT=CSTAR*(WO2D+WH2D)/(32.174*144.*PCD)                        MIXR1130
      IPROP=1                                                           MIXR1140
      TEMP=TH2IN                                                        MIXR1150
      CALL PROP                                                         MIXR1160
      GAMAH2=1545./(778.26*2.016*C1)+1.                                 MIXR1170
      IPROP=2                                                           MIXR1180
      TEMP=TO2IN                                                        MIXR1190
      CALL PROP                                                         MIXR1200
      GAMAO2=1545./(778.26*32.*C1)+1.                                   MIXR1210
      DH2=SQRT(64.348*GAMAH2*2.016/(1545.*(GAMAH2-1.)))                 MIXR1220
      EH2=(PCD/PH2IN)**(1./GAMAH2)                                      MIXR1230
      FH2=SQRT(1.-(PCD/PH2IN)**((GAMAH2-1.)/GAMAH2))                    MIXR1240
      AOH2=WH2D*SQRT(TH2IN)/(144.*CD*PH2IN*DH2*EH2*FH2)                 MIXR1250
      DO2=SQRT(64.348*GAMAO2*32./(1545.*(GAMAO2-1.)))                   MIXR1260
      EO2=(PCD/PO2IN)**(1./GAMAO2)                                      MIXR1270
      FO2=SQRT(1.-(PCD/PO2IN)**((GAMAO2-1.)/GAMAO2))                    MIXR1280
      AOO2=WO2D*SQRT(TO2IN)/(144.*CD*PO2IN*DO2*EO2*FO2)                 MIXR1290
      TH2=TTH2                                                          MIXR1300
      TO2=TTO2                                                          MIXR1310
  100 I=1                                                               MIXR1320
      J=2                                                               MIXR1330
      IPROP=1                                                           MIXR1340
      TEMP=TH2                                                          MIXR1350
      CALL PROP                                                         MIXR1360
      GAMAH2=1545./(778.26*2.016*C1)+1.                                 MIXR1370
      IPROP=2                                                           MIXR1380
      TEMP=TO2                                                          MIXR1390
      CALL PROP                                                         MIXR1400
      GAMAO2=1545./(778.26*32.*C1)+1.                                   MIXR1410
      DH2=SQRT(64.348*GAMAH2*2.016/(1545.*(GAMAH2-1.)))                 MIXR1420
  110 EH2=(PC/PH2)**(1./GAMAH2)                                         MIXR1430
      PCH(I)=PC                                                         MIXR1440
      IF(PC.LE.PH2) GO TO 120                                           MIXR1450
      PC=PH2-1.                                                         MIXR1460
  120 FH2=SQRT(1.-(PC/PH2)**((GAMAH2-1.)/GAMAH2))                       MIXR1470
      WH2=CD*AOH2*PH2*144.*DH2*EH2*FH2/SQRT(TH2)                        MIXR1480
      DO2=SQRT(64.348*GAMAO2*32./(1545.*(GAMAO2-1.)))                   MIXR1490
      EO2=(PC/PO2)**(1./GAMAO2)                                         MIXR1500
      IF(PC .LE. PO2) GO TO 130                                         MIXR1510
      PC=PO2-1.                                                         MIXR1520
  130 FO2=SQRT(1.-(PC/PO2)**((GAMAO2-1.)/GAMAO2))                       MIXR1530
      WO2=CD*AOO2*PO2*144.*DO2*EO2*FO2/SQRT(TO2)                        MIXR1540
      OF=WO2/WH2                                                        MIXR1550
      CALL PERFOR                                                       MIXR1560
      WTOTAL=WO2+WH2                                                    MIXR1570
      PC=CSTAR*WTOTAL/(32.174*144.*ATROAT)                              MIXR1580
      PCH(I+1)=PC                                                       MIXR1590
      DELT(I)=PCH(I+1)-PCH(I)                                           MIXR1600
      IF(ABS(DELT(I)) .LE. 1.E-03) PC=PCH(I)                            MIXR1610
      IF(ABS(DELT(I)) .LE. 1.E-03) GO TO 170                            MIXR1620
      IF(I .NE. 1) GO TO 150                                            MIXR1630
      STEP=(PCH(I+1)-PCH(I))/20.                                        MIXR1640
  140 I=I+1                                                             MIXR1650
      PCH(I)=PCH(I-1)+STEP                                              MIXR1660
      PC=PCH(I)                                                         MIXR1670
      GO TO 110                                                         MIXR1680
  150 IF(STEP .LT. 0.) GO TO 160                                        MIXR1690
      IF(DELT(I) .GT. 0.) GO TO 140                                     MIXR1700
      ACONST=(DELT(I)-DELT(I-1))/(PCH(I)-PCH(I-1))                      MIXR1710
      BCONST=DELT(I)-ACONST*PCH(I)                                      MIXR1720
      PC=-BCONST/ACONST                                                 MIXR1730
      GO TO 170                                                         MIXR1740
  160 IF(DELT(I) .LT. 0.) GO TO 140                                     MIXR1750
      ACONST=(DELT(I)-DELT(I-1))/(PCH(I)-PCH(I-1))                      MIXR1760
      BCONST=DELT(I)-ACONST*PCH(I)                                      MIXR1770
      PC=-BCONST/ACONST                                                 MIXR1780
  170 THRUST=(WH2+WO2)*SI                                               MIXR1790
      I=1                                                               MIXR1800
      RETURN                                                            MIXR1810
      END                                                                      -
      SUBROUTINE PERFOR                                                 PERF1000
      COMMON/LIST5/WO2D,WH2D,PC,TH2IN,TO2IN,PH2IN,PO2IN,CD,TH2,TO2,PH2, PERF1010
     1PO2,WH2,WO2,OF,WTOTAL,THRUST,SI,CSTAR,J,PCD,EPS,THRUSN,NENG(100)  PERF1020
      DIMENSION FC1(5),FC2(5),FC3(5),FC4(5),AEPS(6)                     PERF1030
      DATA AEPS(1),AEPS(2),AEPS(3),AEPS(4),AEPS(5),AEPS(6)/2.,4.,6.,8., PERF1040
     110.,12./,FC1(1),FC2(1),FC3(1),FC4(1)/1.4552,-1.9286E-3,2.8214E-3, PERF1050
     2-2.5E-4/,FC1(2),FC2(2),FC3(2),FC4(2)/1.6026,-5.1524E-2,2.139E-2,-2PERF1060
     3.083E-3/,FC1(3),FC2(3),FC3(3),FC4(3)/1.6186,-1.4191E-2,9.143E-3,-6PERF1070
     4.667E-4/,FC1(4),FC2(4),FC3(4),FC4(4)/1.6398,-1.1214E-2,1.0036E-2, PERF1080
     5-7.5E-4/,FC1(5),FC2(5),FC3(5),FC4(5)/1.6530,-9.2381E-3,1.09286E-2,PERF1090
     6-9.33E-4/                                                         PERF1100
      COF=3.0615486E+2+8.236289E+1*OF-2.5341553E+1*OF**2+2.0052997*OF**3PERF1110
      CF=9.5669612E-1+5.6185918E-5*THRUSN-2.4131457E-8*THRUSN**2+4.8906 PERF1120
     1032E-12*THRUSN**3-4.5638046E-16*THRUSN**4+1.5831677E-20*THRUSN**5 PERF1130
      C=7.2869684E-1+1.240197E-1*EPS-2.1588381E-2*EPS**2+1.9211745E-3* EPERF1140
     1PS**3-8.3143012E-5*EPS**4+1.3822125E-6*EPS**5                     PERF1150
      CH2=-1.888383E+1+4.4876594E-2*TH2-1.8175606E-5*TH2**2             PERF1160
      CO2=-2.8246153+5.6461536E-3*TO2-7.692306E-7*TO2**2                PERF1170
      G=1.02231-1.8563732E-2*OF+4.2676188E-3*OF**2                      PERF1180
      CST=1.+(G-1.)*(THRUSN-1500.)/3500.                                PERF1190
      SI=(COF*CF*C*CST)+CH2+CO2                                         PERF1200
      IF(EPS.GE.2.) IEP=1                                               PERF1210
      IF(EPS.GT.4.) IEP=2                                               PERF1220
      IF(EPS.GT.6.) IEP=3                                               PERF1230
      IF(EPS.GT.8.) IEP=4                                               PERF1240
      CONSTE=(EPS-AEPS(IEP))/(AEPS(IEP+1)-AEPS(IEP))                    PERF1250
      CFD1=FC1(IEP)+OF*(FC2(IEP)+OF*(FC3(IEP)+OF*FC4(IEP)))             PERF1260
      CFD2=FC1(IEP+1)+OF*(FC2(IEP+1)+OF*(FC3(IEP+1)+OF*FC4(IEP+1)))     PERF1270
      CFD=CFD1+CONSTE*(CFD2-CFD1)                                       PERF1280
      CSTAR=SI*32.174/CFD                                               PERF1290
      RETURN                                                            PERF1300
      END                                                                      -
      SUBROUTINE PROP                                                   PROP1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  PROP1010
      IF(IPROP .EQ. 2) GO TO 100                                        PROP1020
      H2=-159.269+8.35141*TEMP-8.772E-02*TEMP**2+6.50883E-04*TEMP**3 -2.PROP1030
     162168E-06*TEMP**4+6.31503E-09*TEMP**5-9.1409E-12*TEMP**6 +7.34314EPROP1040
     2-15*TEMP**7-2.51351E-18*TEMP**8                                   PROP1050
      C1=3.03117-4.82186E-02*TEMP+4.8623E-04*TEMP**2 -1.87672E-06*TEMP**PROP1060
     1 3+3.41039E-09*TEMP**4-2.89064E-12*TEMP**5+8.90642E-16*TEMP**6    PROP1070
      U2=-165.557+7.93112*TEMP-9.7479E-02*TEMP**2+7.19637E-04*TEMP**3 -2PROP1080
     1.84631E-06*TEMP**4+6.61221E-09*TEMP**5-9.06646E-12*TEMP**6 +6.7929PROP1090
     27E-15*TEMP**7-2.14088E-18*TEMP**8                                 PROP1100
      GO TO 110                                                         PROP1110
  100 H2=30.6126-.310747*TEMP+1.87447E-03*TEMP**2+1.40971E-05*TEMP**3 -1PROP1120
     1.47593E-07*TEMP**4+5.57469E-10*TEMP**5-1.07972E-12*TEMP**6 +1.0690PROP1130
     23E-15*TEMP**7-4.28834E-19*TEMP**8                                 PROP1140
      C1=1.59616-3.01669E-02*TEMP+2.66764E-04*TEMP**2-1.28616E-06*TEMP**PROP1150
     1 3+3.64326E-09*TEMP**4-6.05621E-12*TEMP**5+5.46723E-15*TEMP**6 -2.PROP1160
     206717E-18*TEMP**7                                                 PROP1170
      U2=-1390.11+34.2737*TEMP-.358416*TEMP**2+2.10161E-03*TEMP**3 -7.52PROP1180
     1002E-06*TEMP**4+1.68156E-08*TEMP**5-2.29553E-11*TEMP**6 +1.75009E-PROP1190
     214*TEMP**7-5.70908E-18*TEMP**8                                    PROP1200
  110 RETURN                                                            PROP1210
      END                                                                      -
      SUBROUTINE PROP2                                                  PROP1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  PROP1010
      COMMON/LIST2/W5,W6,T,T0,H1,D,W0,R,V,W,P,Q,IVENT,W2,P0,SUMWV,D0, SUPROP1020
     1MWIN,A,T3,C2,WTANK,PONE,PTWO,TONE,TTWO,ISWITC,DSAVE,TSS3,TPONE ,TOPROP1030
     2NE3,WONE,Q0,ITER,SUMR(2),SUMV(2),RWDOT(2),IPASHX ,ENTH(2),DSAVE2,WPROP1040
     3DOTBO(2),HVAP(2),WLR(2),ITIME ,TINS1,CPINS,WINS,AVENT(2),PRES(2),RPROP1050
     4ONE,RTWO,WDMIN,ICONT1 ,RSWITC,JSWITC(2),KSWITC(2),LSWITC(2)       PROP1060
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDPROP1070
     1IN                                                                PROP1080
      TSAVE=T                                                           PROP1090
      PSAVE=P                                                           PROP1100
      IF(IPROP.EQ.2) GO TO 120                                          PROP1110
      WM=2.016                                                          PROP1120
      ANOT=.1975                                                        PROP1130
      ABB=-.00506                                                       PROP1140
      BNOT=.02096                                                       PROP1150
      BBB=-.04359                                                       PROP1160
      CBB=.0504E+4                                                      PROP1170
      IF(TEMP.GT.180.) GO TO 100                                        PROP1180
      A1=4.977816011                                                    PROP1190
      A2=-.003384077523                                                 PROP1200
      A3=.0003521443738                                                 PROP1210
      A4=-.1435633178E-4                                                PROP1220
      A5=.2303247505E-6                                                 PROP1230
      A6=-.1038316229E-8                                                PROP1240
      GO TO 110                                                         PROP1250
  100 A1=13.4408                                                        PROP1260
      A2=-.378855                                                       PROP1270
      A3=5.85297E-3                                                     PROP1280
      A4=-3.72881E-5                                                    PROP1290
      A5=1.06569E-7                                                     PROP1300
      A6=-1.13579E-10                                                   PROP1310
  110 BE=31.67E-3                                                       PROP1320
      A1VIS=9.91873E-6                                                  PROP1330
      A2VIS=3.14493E-7                                                  PROP1340
      A3VIS=-2.10262E-10                                                PROP1350
      A4VIS=1.03081E-13                                                 PROP1360
      A5VIS=-1.95760E-17                                                PROP1370
      A1COND=2.15573E-4                                                 PROP1380
      A2COND=9.12422E-7                                                 PROP1390
      A3COND=-2.07702E-10                                               PROP1400
      A4COND=1.31943E-13                                                PROP1410
      A5COND=-2.93039E-17                                               PROP1420
      GO TO 130                                                         PROP1430
  120 WM=32.                                                            PROP1440
      ANOT=1.4911                                                       PROP1450
      ABB=.02562                                                        PROP1460
      BNOT=.04624                                                       PROP1470
      BBB=.004208                                                       PROP1480
      CBB=4.8E+4                                                        PROP1490
      A1=6.91726                                                        PROP1500
      A2=-5.58781E-4                                                    PROP1510
      A3=4.83537E-6                                                     PROP1520
      A4=-3.7049E-9                                                     PROP1530
      A5=8.48173E-13                                                    PROP1540
      A6=0.                                                             PROP1550
      BE=57.75E-3                                                       PROP1560
      A1VIS=4.18701E-6                                                  PROP1570
      A2VIS=8.0274E-7                                                   PROP1580
      A3VIS=-5.26883E-10                                                PROP1590
      A4VIS=2.43757E-13                                                 PROP1600
      A5VIS=-4.37232E-17                                                PROP1610
      A1COND=3.22828E-6                                                 PROP1620
      A2COND=2.22618E-7                                                 PROP1630
      A3COND=-5.89685E-11                                               PROP1640
      A4COND=1.16766E-14                                                PROP1650
      A5COND=-2.69725E-19                                               PROP1660
  130 P=PRESS*.06804619                                                 PROP1670
      T=TEMP/1.8                                                        PROP1680
      PI=.08206*T/P                                                     PROP1690
      EPS=CBB/(PI*T*T*T)                                                PROP1700
      AA=ANOT*(1.-ABB/PI)                                               PROP1710
      BB=BNOT*(1.-BBB/PI)                                               PROP1720
      ASSIGN 150 TO N                                                   PROP1730
      V1=(PI+BB)*(1.-EPS)-AA/(.08206*T)                                 PROP1740
      M=0                                                               PROP1750
  140 AA=ANOT*(1.-ABB/V1)                                               PROP1760
      BB=BNOT*(1.-BBB/V1)                                               PROP1770
      EPS=CBB/(V1*T*T*T)                                                PROP1780
      P1=.08206*T*(1.-EPS)*(V1+BB)/(V1*V1)-AA/(V1*V1)                   PROP1790
      GO TO N,(150,160)                                                 PROP1800
  150 ASSIGN 160 TO N                                                   PROP1810
      V2=V1                                                             PROP1820
      P2=P1                                                             PROP1830
      V1=P1*V1/P                                                        PROP1840
      GO TO 140                                                         PROP1850
  160 TAN=(P1-P2)/(1./V1-1./V2)                                         PROP1860
      RHO=1./V1+(P-P1)/TAN                                              PROP1870
      V2=V1                                                             PROP1880
      V1=1./RHO                                                         PROP1890
      P2=P1                                                             PROP1900
      M=M+1                                                             PROP1910
      IF(ABS(P1-P)/P.GT..0001) GO TO 140                                PROP1920
      RHO=1./V2                                                         PROP1930
      CVTNOT=(1./WM)*(A1-1.98726+T*(A2+T*(A3+T*(A4+T*(A5+T*A6)))))      PROP1940
      CV=CVTNOT+11.922*CBB/(WM*T*T*T*V2)*(1.+BNOT*(1.-BBB*.666/V2)/(2.* PROP1950
     1V2))                                                              PROP1960
      PCP=1.+2.*CBB/(V2*T*T*T)*(1.+BNOT/V2*(1.-BBB/V2))+BNOT/V2*(1.-BBB/PROP1970
     1 V2)                                                              PROP1980
      PCP=(-1.98701/WM)*PCP*PCP/(-1.+RHO*(CBB/(T*T*T)*(2.+BNOT*RHO*(3.- PROP1990
     14.*BBB*RHO))+ANOT/(.08206*T)*(2.-3.*ABB*RHO)+BNOT*(-2.+3.*BBB*RHO PROP2000
     2)))                                                               PROP2010
      CP=CV+PCP                                                         PROP2020
      VISNOT=(A1VIS+T*(A2VIS+T*(A3VIS+T*(A4VIS+T*A5VIS))))*6.7197E-2    PROP2030
      TERM=BE*RHO                                                       PROP2040
      YCOND=1.+TERM*(.625+TERM*(.2862+TERM*.115))                       PROP2050
      PVIS=1./YCOND+TERM*(.8+TERM*.761*YCOND)                           PROP2060
      VIS=PVIS*VISNOT                                                   PROP2070
      PCOND=1./YCOND+TERM*(1.2+.775*TERM*YCOND)                         PROP2080
      CONNOT=(A1COND+T*(A2COND+T*(A3COND+T*(A4COND+T*A5COND))))*.0671527PROP2090
      COND=PCOND*CONNOT                                                 PROP2100
      RHO=RHO*WM*.06242                                                 PROP2110
      T=TSAVE                                                           PROP2120
      P=PSAVE                                                           PROP2130
      RETURN                                                            PROP2140
      END                                                                      -
      SUBROUTINE PROP3                                                  PROP1000
      COMMON/LIST1/TEMP,IPROP,C1,H2,U2                                  PROP1010
      COMMON/LIST3/PRESS,CP,VIS,COND,RHO,DIA,HCONV,WTVEH,XXX,THKIN, CONDPROP1020
     1IN                                                                PROP1030
      COMMON/LIST7/QOA(2),HMENIS,SIN,ALSA,HLV,SL,SLV,HV,VL,ITANK ,CVBARVPROP1040
     1,CVBARL,UBARV,UBARL,VLV                                           PROP1050
      IF(IPROP .EQ. 2) GO TO 100                                        PROP1060
      HLV=195.016+.138803*PRESS-4.01665E-02*PRESS**2+1.40155E-3*PRESS**3PROP1070
     1-2.89763E-05*PRESS**4+3.18662E-07*PRESS**5-1.43388E-09*PRESS**6   PROP1080
      SL=1.31133+.064394*PRESS-2.32713E-03*PRESS**2+6.43198E-05*PRESS**3PROP1090
     1-1.0834E-06*PRESS**4+9.96326E-09*PRESS**5-3.82998E-11*PRESS**6    PROP1100
      SLV=7.19117-.234028*PRESS+1.08775E-02*PRESS**2 -3.53553E-04*PRESS*PROP1110
     1*3+6.88259E-06*PRESS**4-7.23658E-08*PRESS**5 +3.14733E-10*PRESS**6PROP1120
      HV=67.3875+1.56854*PRESS-5.31773E-02*PRESS**2+1.04009E-03*PRESS**3PROP1130
     1-1.12414E-05*PRESS**4+5.01635E-08*PRESS**5                        PROP1140
      VL=.211195+1.30186E-03*PRESS-2.38161E-05*PRESS**2 +4.21164E-07*PREPROP1150
     1SS**3-3.90212E-09*PRESS**4+1.53439E-11*PRESS**5                   PROP1160
      GO TO 110                                                         PROP1170
  100 PRESS=PRESS*.068046                                               PROP1180
      HLV=229.52-25.0874*PRESS+13.7136*PRESS**2-5.36553*PRESS**3 +1.0981PROP1190
     18*PRESS**4-8.89419E-02*PRESS**5                                   PROP1200
      HLV=HLV*.429841                                                   PROP1210
      SL=2.60416+.564641*PRESS-.338722*PRESS**2+.131215*PRESS**3 -2.6638PROP1220
     13E-02*PRESS**4+2.14823E-03*PRESS**5                               PROP1230
      SLV=3.0612-1.2118*PRESS+.765456*PRESS**2-.301295*PRESS**3 +6.16304PROP1240
     1E-02*PRESS**4-4.99219E-03*PRESS**5                                PROP1250
      PRESS=PRESS/.068046                                               PROP1260
      HV=50.803-4.08561*PRESS+.389208*PRESS**2-.019053*PRESS**3 +5.3994EPROP1270
     1-04*PRESS**4-8.92743E-06*PRESS**5+7.9759E-08*PRESS**6 -2.95997E-10PROP1280
     2*PRESS**7                                                         PROP1290
      VL=1.33701E-02+6.36338E-05*PRESS-1.07326E-06*PRESS**2 +1.27317E-08PROP1300
     1*PRESS**3-6.23256E-11*PRESS**4                                    PROP1310
      VLV=3408.76+TEMP*(-76.0141+TEMP*(.639528+TEMP*(-2.40242E-3+3.3965EPROP1320
     1-6*TEMP)))                                                        PROP1330
      UBARL=-25880.3+TEMP*(613.54+TEMP*(-5.46839+TEMP*(2.16576E-2-3.2138PROP1340
     13E-5*TEMP)))                                                      PROP1350
      UBARV=64464.2+TEMP*(-1504.09+TEMP*(13.1572+TEMP*(-5.11255E-2+7.446PROP1360
     131E-5*TEMP)))                                                     PROP1370
      CVBARV=-323.999+TEMP*(7.61774+TEMP*(-6.71157E-2+TEMP*(2.62729E-4-3PROP1380
     1.8557E-7*TEMP)))                                                  PROP1390
      CVBARL=-.275+1.29838E-2*TEMP-1.16319E-4*TEMP**2+4.35814E-7*TEMP**3PROP1400
     1-5.95374E-10*TEMP**4                                              PROP1410
  110 RETURN                                                            PROP1420
      END                                                                      -
